Reference API Roblox

Engine API

Website

Related

Reference API Roblox

UIShadow

Renders a shadow below the parent UI instance.

Member index 7

HistoryMember
731BlurRadius: UDim
731Color: Color3
731Enabled: bool
731Offset: UDim2
731Spread: UDim2
731Transparency: float
731ZIndex: int
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

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 Color and Transparency.
  • Adjust the shadow's position and size relative to the parent with Offset and Spread.
  • 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

  • UIShadow does not support text. If you add a UIShadow to a TextLabel or TextButton, it renders a shadow of the object's rectangular bounding area, not of the text.
  • UIShadow does not support inset shadows.
  • UIShadow does not support Path2D.
  • You cannot apply textures or UIGradients to a UIShadow.

History 24

Members 7

BlurRadius

TypeDefault
UDim0, 0

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.

History 3

Color

TypeDefault
Color30, 0, 0

This property determines the shadow's color.

History 3

Enabled

TypeDefault
booltrue

This property determines whether the UIShadow is visible. Default is true.

History 3

Offset

TypeDefault
UDim2{0, 0}, {0, 0}

This property moves the shadow relative to the parent's position.

History 3

Spread

TypeDefault
UDim2{0, 0}, {0, 0}

This property changes the shadow's size. Properties that are relative to the parent's size, such as the scale factors of BlurRadius and Offset, are not affected by Spread.

History 3

Transparency

TypeDefault
float0

This property sets the shadow's transparency, with 0 being fully opaque and 1 being fully transparent.

History 3

ZIndex

TypeDefault
int-1

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.

History 3

Settings