Reference API Roblox

Engine API

Website

Related

Reference API Roblox

UIShadow

Renders a shadow below the parent UI instance.

Member index 7

HistoryMember
711BlurRadius: UDim
711Color: Color3
724Enabled: bool
711Offset: UDim2
711Spread: UDim2
711Transparency: float
711ZIndex: int
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
723IsInSandbox: bool
553Name: string
553Parent: Instance
702PredictionMode: PredictionMode
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
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
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

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 10

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 1

Color

TypeDefault
Color30, 0, 0

This property determines the shadow's color.

History 1

Enabled

TypeDefault
booltrue

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

History 1

Offset

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

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

History 1

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 1

Transparency

TypeDefault
float0

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

History 1

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 1

Settings