Reference API Roblox

Engine API

Website

Related

Reference API Roblox

Decal

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

Member index 23

HistoryMember
731AutoLocalize: bool
731Color3: Color3
690ColorMap: ContentId
731ColorMapContent: Content
731MetalnessMapContent: Content
731NormalMapContent: Content
731Rotation: float
731RoughnessMapContent: Content
731Shiny: float
731Specular: float
645Texture: ContentId
731TextureContent: Content
686TexturePack: ContentId
731TexturePackContent: Content
731Transparency: float
731UVOffset: Vector2
731UVScale: Vector2
731ZIndex: int
inherited from FaceInstance
731Face: NormalId
inherited from Instance
731Archivable: bool
731Capabilities: SecurityCapabilities
731IsInSandbox: bool
731Name: string
731Parent: Instance
731PredictionMode: PredictionMode
731Sandboxed: bool
731UniqueId: 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
731children(): Instances
731clone(): Instance
731destroy(): null
731findFirstChild(name: string, recursive: bool = false): Instance
731getChildren(): Instances
731isDescendantOf(ancestor: Instance): bool
731remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
731childAdded(child: Instance)
inherited from Object
731ClassName: string
731className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
731isA(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 78

Members 23

AutoLocalize

TypeDefault
booltrue

History 2

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 6

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 3

Tags: [NotReplicated]

MetalnessMapContent

TypeDefault
Content

History 3

NormalMapContent

TypeDefault
Content

History 3

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 3

RoughnessMapContent

TypeDefault
Content

History 3

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 7

  • 731 Change Default of Shiny from to 20
  • 726 Change Default of Shiny from 20 to
  • 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 7

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 4

TexturePack

TypeDefault
ContentId

History 1

TexturePackContent

TypeDefault
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 6

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 3

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 3

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 5

Settings