Reference API Roblox

Engine API

Website

Related

Reference API Roblox

Decal

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

Member index 20

HistoryMember
553Color3: Color3
690ColorMap: ContentId
690ColorMapContent: Content
683MetalnessMapContent: Content
683NormalMapContent: Content
683RoughnessMapContent: Content
553Shiny: float
553Specular: float
645Texture: ContentId
664TextureContent: Content
686TexturePack: ContentId
553Transparency: float
683UVOffset: Vector2
683UVScale: Vector2
553ZIndex: int
inherited from FaceInstance
553Face: NormalId
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
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
486GetDescendants(): Array
486GetFullName(): string
691GetPredictionMode(): PredictionMode
641GetStyled(name: string): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
690IsPredicted(): 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
690SetPredictionMode(mode: PredictionMode): 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 44

Members 20

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]

MetalnessMapContent

TypeDefault
Content

History 1

NormalMapContent

TypeDefault
Content

History 1

RoughnessMapContent

TypeDefault
Content

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

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