Class
UIShadow
Renders a shadow below the parent UI instance.
UIShadow renders a drop shadow below its parent UI instance. Key features
include:
- Adjust the shadow's bluriness with
BlurRadius. - Adjust the shadow's color and transparency with
ColorandTransparency. - Adjust the shadow's position and size relative to the parent with
OffsetandSpread. - Add multiple shadows under the same parent and adjust their render order
with
ZIndex. - If the parent is rotated with
GuiObject.Rotation, the shadow will also be rotated. - If the parent has round corners with
UICorner, the shadow will also have round corners.
Limitations#
UIShadowdoes not support text. If you add aUIShadowto aTextLabelorTextButton, it renders a shadow of the object's rectangular bounding area, not of the text.UIShadowdoes not support inset shadows.UIShadowdoes not supportPath2D.- You cannot apply textures or
UIGradientsto aUIShadow.
Properties 7#
BlurRadiusUDim | Determines the shadow's blurriness.ReadSafe |
ColorColor3 | Determines the shadow's color.ReadSafe |
Enabledboolean | Determines whether the UIShadow is visible.ReadSafe |
OffsetUDim2 | Moves the shadow relative to the parent's position.ReadSafe |
SpreadUDim2 | Expands or shrinks the shadow relative to the parent's size.ReadSafe |
Transparencyfloat | Sets the shadow's transparency.ReadSafe |
ZIndexint | Determines the shadow's render order relative to sibling UIShadow
instances.ReadSafe |
BlurRadius: UDim#
ReadSafe
This property determines the shadow's blurriness. A larger value makes the shadow's edges appear softer.
Note that the scale factor of this UDim property is relative to
the parent's width or height, whichever is shorter. This property must
also be non-negative; a negative value will be treated as 0.
Color: Color3#
ReadSafe
This property determines the shadow's color.
Enabled: boolean#
ReadSafe
This property determines whether the UIShadow is visible. Default is
true.
Offset: UDim2#
ReadSafe
This property moves the shadow relative to the parent's position. The X scale factor is relative to the parent's width, and the Y scale factor is relative to the parent's height.
Spread: UDim2#
ReadSafe
This property expands or shrinks the shadow relative to the parent's size.
The X scale factor is relative to the parent's width, and the Y scale
factor is relative to the parent's height. Properties that are relative to
the parent's size, such as the scale factors of
BlurRadius and Offset,
are not affected by Spread.
Transparency: float#
ReadSafe
This property sets the shadow's transparency, with 0 being fully opaque
and 1 being fully transparent.
ZIndex: int#
ReadSafe
If a UI instance has multiple shadows, they are rendered in order of
increasing ZIndex. Since all shadows are rendered below the parent
instance, ZIndex can only be negative.
Inherited members#
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