Reference API Roblox

Engine API

Website

Related

Reference API Roblox

Decal

Applies an image texture to a face of a parent BasePart.

Member index 26

HistoryMember
728AutoLocalize: bool
553Color3: Color3
690ColorMap: ContentId
690ColorMapContent: Content
736EmissiveMaskContent: Content
736EmissiveStrength: float
736EmissiveTint: Color3
683MetalnessMapContent: Content
683NormalMapContent: Content
710Rotation: float
683RoughnessMapContent: Content
553Shiny: float
553Specular: float
645Texture: ContentId
664TextureContent: Content
686TexturePack: ContentId
731TexturePackContent: Content
553Transparency: float
683UVOffset: Vector2
683UVScale: Vector2
553ZIndex: int
inherited from FaceInstance
553Face: NormalId
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
723IsInSandbox: bool
553Name: string
553Parent: Instance
702PredictionMode: PredictionMode
670Sandboxed: bool
680UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
707GetDescendants(): Instances
486GetFullName(): string
706GetStyled(name: string, selector: string?): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
698QueryDescendants(selector: string): Instances
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

The Decal object applies an image texture to a face of a parent BasePart. The affected face is dependent on the Face property, and the size of the decal is dependent on the size of the face.

The applied image texture is determined by its ColorMapContent property. For details on how to upload images, see asset management.

For more information, review textures and decals. See also:

History 50

Members 26

AutoLocalize

TypeDefault
booltrue

When set to true, the decal's image asset is eligible for automatic localization through the Automatic Asset Capture system. The LocalizationService uses this property to determine whether the decal's ColorMapContent should be captured and potentially replaced with a localized version.

This property only applies to non-PBR decals. If any PBR maps (NormalMapContent, RoughnessMapContent, or MetalnessMapContent) are set, automatic localization capture is suppressed to avoid inconsistent rendering.

History 1

Color3

TypeDefault
Color31, 1, 1

The Color3 tint of the Decal. Note that this property only sets the tint of the decal rather than the color; unless the image associated with the Decal was originally pure white, then the color cannot be freely changed using this property.

History 4

ColorMap

TypeDefault
ContentId

This property takes a content ID to determine the color and opacity of the surface. This texture is sometimes called the albedo texture.

This property is not replicated. Its interface does not cross the network boundary.

History 1

Tags: [NotReplicated]

ColorMapContent

TypeDefault
Content

This property takes a Content object to determine the color and opacity of the surface. This texture is sometimes called the albedo texture.

This property is not replicated. Its interface does not cross the network boundary.

History 1

Tags: [NotReplicated]

EmissiveMaskContent

TypeDefault
Content

History 1

EmissiveStrength

TypeDefault
float1

History 1

EmissiveTint

TypeDefault
Color31, 1, 1

History 1

MetalnessMapContent

TypeDefault
Content

This property takes a Content object that determines the metalness map applied to the surface. A metalness map controls how metallic the surface appears at each point, blending between a dielectric (non-metal) and a metallic response to light. It defaults to an empty content, in which case no metalness map is applied.

Assigning a normal, roughness, or metalness map makes the Decal a physically based rendering (PBR) surface.

History 1

NormalMapContent

TypeDefault
Content

This property takes a Content object that determines the normal map applied to the surface. A normal map perturbs the surface normals used in lighting calculations, adding the appearance of fine detail such as bumps and grooves without changing the underlying geometry. It defaults to an empty content, in which case no normal map is applied.

Assigning a normal, roughness, or metalness map makes the Decal a physically based rendering (PBR) surface.

History 1

Rotation

TypeDefault
float0

This property controls the rotation angle of the decal texture in degrees. Rotation is applied to the UV coordinates in the clockwise direction.

History 1

RoughnessMapContent

TypeDefault
Content

This property takes a Content object that determines the roughness map applied to the surface. A roughness map controls how rough or smooth the surface appears at each point, which in turn determines how sharp or blurry its reflections are. It defaults to an empty content, in which case no roughness map is applied.

Assigning a normal, roughness, or metalness map makes the Decal a physically based rendering (PBR) surface.

History 1

Shiny

TypeDefault
float20

This property dictates how shiny the decal is. It takes a value between 0 and 1, where 1 is "fully shiny."

This property is deprecated. It exists only for backward compatibility, and should not be used for new work.
This property is not replicated. Its interface does not cross the network boundary.

History 5

  • 553 Change Default of Shiny from to 20
  • 486 Change ThreadSafety of Shiny from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of Shiny from to ReadOnly
  • 208 Change Tags of Shiny from [NotReplicated] to [NotReplicated, Deprecated]
  • 47 Add Shiny
Tags: [NotReplicated, Deprecated]

Specular

TypeDefault
float0

Sets the specularity, which is how the surface responds to light being shined on it.

This property is deprecated. It exists only for backward compatibility, and should not be used for new work.
This property is not replicated. Its interface does not cross the network boundary.

History 5

Tags: [NotReplicated, Deprecated]

Texture

TypeDefault
ContentId

The content ID of the image to be applied by the Decal.

History 4

TextureContent

TypeDefault
Content

The texture content displayed by the Decal. Supports asset URIs and EditableImage objects.

History 2

TexturePack

TypeDefault
ContentId

History 1

TexturePackContent

TypeDefault
Content

Managed by the engine and not accessible from scripts. A Content that holds the decal's compressed runtime texture data. When the Decal is a physically based rendering (PBR) surface, the engine packs its color, normal, roughness, and metalness maps into a single texture-pack asset and references it here. Defaults to an empty content.

History 1

Transparency

TypeDefault
float0

Determines the transparency of the Decal with 0 being completely opaque and 1 completely transparent.

Note that LocalTransparencyModifier acts as a multiplier for this transparency level and should be used when the transparency of the decal is likely to be changed by another script.

History 4

UVOffset

TypeDefault
Vector20, 0

This property controls the UV coordinate translation. The X value (U offset) and Y value (V offset) are added to every corresponding UV coordinate during texture mapping.

History 1

UVScale

TypeDefault
Vector21, 1

This property controls the scale applied to the horizontal and vertical coordinates. The X value (U scale) and Y value (V scale) are multiplied by every corresponding UV coordinate during texture mapping.

History 1

ZIndex

TypeDefault
int1

This property determines the order in which decals on the same Face of a BasePart are rendered. Lower values are rendered first, so a decal with a higher ZIndex renders on top of those with a lower ZIndex.

If you're unsure whether you'll need to layer a decal between two already-existing decals in the future, use larger separations between ZIndex values such as 10 or 100 to ensure space for future decals between.

History 3

Settings