Class
Decal
Applies an image texture to a face of a parent BasePart.
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:
Texturefor repeating surface images.MeshPart.TextureContentto apply an image texture to aMeshPart.SurfaceGuito apply anImageLabelorImageButtonto an in-experience 3D object.
Properties 21#
AutoLocalizeboolean | When set to true, the decal's image asset is eligible for automatic
localization capture.ReadSafe |
Color3Color3 | The Color3 tint of the Decal.ReadSafe |
ColorMapContentId | Content ID that determines the color and opacity of the surface.ReadSafeNotReplicated |
ColorMapContentContent | Content object that determines the color and opacity of the
surface.ReadSafeNotReplicated |
LocalTransparencyModifierfloat | Acts as a multiplier for the decal's
Transparency property. The effects are only
visible to the local player.ReadSafeHiddenNotReplicated |
MetalnessMapContentId | Content ID that determines the metalness map of the surface.Read: PluginSecurityWrite: PluginSecurityReadSafeHidden |
MetalnessMapContentContent | Content object that determines the metalness map of the
surface.Write: PluginSecurityReadSafe |
NormalMapContentId | Content ID that determines the normal map of the surface.Read: PluginSecurityWrite: PluginSecurityReadSafeHidden |
NormalMapContentContent | Content object that determines the normal map of the surface.Write: PluginSecurityReadSafe |
Rotationfloat | Rotates the decal texture.ReadSafe |
RoughnessMapContentId | Content ID that determines the roughness map of the surface.Read: PluginSecurityWrite: PluginSecurityReadSafeHidden |
RoughnessMapContentContent | Content object that determines the roughness map of the
surface.Write: PluginSecurityReadSafe |
Shinyfloat | Deprecated property that previously set the shininess of the decal.ReadSafeDeprecatedNotReplicated |
Specularfloat | Deprecated property that previously set the specularity of the decal.ReadSafeDeprecatedNotReplicated |
TextureContentId | The content ID of the image to be applied by the Decal.ReadSafeDeprecated |
TextureContentContent | The texture content displayed by the Decal.ReadSafeDeprecated |
TexturePackContentContent | Engine-managed Content that stores the compressed runtime
texture-pack data for PBR decals.Read: RobloxEngineSecurityWrite: RobloxEngineSecurityReadSafe |
Transparencyfloat | Determines the transparency of the Decal.ReadSafe |
UVOffsetVector2 | Shifts the UV coordinates by adding an offset before texture mapping.ReadSafe |
UVScaleVector2 | Stretches or compresses the UV coordinates by multiplying a scale factor.ReadSafe |
ZIndexint | Determines the rendering order when multiple decals are assigned the same face.ReadSafe |
AutoLocalize: boolean#
ReadSafe
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.
Color3: Color3#
ReadSafe
ColorMap: ContentId#
NotReplicatedReadSafe
This property takes a content ID to determine the color and opacity of the surface. This texture is sometimes called the albedo texture.
ColorMapContent: Content#
NotReplicatedReadSafe
This property takes a Content object to determine the color and
opacity of the surface. This texture is sometimes called the albedo
texture.
LocalTransparencyModifier: float#
HiddenNotReplicatedReadSafe
Acts as a multiplier for the decal's
Transparency property. The effect is only
visible to the LocalPlayer and will not
replicate to the server.
When this property is set to 1, the Decal will be completely
invisible regardless of its original transparency. When it is set to 0,
the decal's rendered transparency will match the
Transparency value.
MetalnessMap: ContentId#
HiddenRead: PluginSecurityWrite: PluginSecurityReadSafe
This property takes a content ID 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. To assign this map from a
Content object, use
MetalnessMapContent.
MetalnessMapContent: Content#
Write: PluginSecurityReadSafe
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.
NormalMap: ContentId#
HiddenRead: PluginSecurityWrite: PluginSecurityReadSafe
This property takes a content ID 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. To assign this map from a
Content object, use
NormalMapContent.
NormalMapContent: Content#
Write: PluginSecurityReadSafe
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.
Rotation: float#
ReadSafe
This property controls the rotation angle of the decal texture in degrees. Rotation is applied to the UV coordinates in the clockwise direction.
RoughnessMap: ContentId#
HiddenRead: PluginSecurityWrite: PluginSecurityReadSafe
This property takes a content ID 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. To assign this map from a
Content object, use
RoughnessMapContent.
RoughnessMapContent: Content#
Write: PluginSecurityReadSafe
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.
Shiny: float#
NotReplicatedDeprecatedReadSafeDeprecated
Deprecated. This non-functional property is deprecated and should not be used in new work.
This property dictates how shiny the decal is. It takes a value between
0 and 1, where 1 is "fully shiny."
Specular: float#
NotReplicatedDeprecatedReadSafeDeprecated
Deprecated. This property no longer functions correctly and is deprecated. It should not be used in new work.
Sets the specularity, which is how the surface responds to light being shined on it.
Texture: ContentId#
ReadSafeDeprecated
Deprecated. This property has been deprecated. Use
ColorMapContent for future work.
The content ID of the image to be applied by the Decal.
TextureContent: Content#
ReadSafeDeprecated
Deprecated. This property has been deprecated. Use
ColorMapContent for future work.
The texture content displayed by the Decal. Supports
asset URIs and
EditableImage objects.
TexturePackContent: Content#
Read: RobloxEngineSecurityWrite: RobloxEngineSecurityReadSafe
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.
Transparency: float#
ReadSafe
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.
UVOffset: Vector2#
ReadSafe
UVScale: Vector2#
ReadSafe
ZIndex: int#
ReadSafe
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.
Inherited members#
Inherited from FaceInstance 1
Properties (1)
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild