Reference API Roblox

Engine API

Website

Related

Reference API Roblox

UIShadow

Renders a shadow below the parent UI instance.

Member index 7

HistoryMember
726BlurRadius: UDim
726Color: Color3
726Enabled: bool
726Offset: UDim2
726Spread: UDim2
726Transparency: float
726ZIndex: int
inherited from Instance
726Archivable: bool
726Capabilities: SecurityCapabilities
726IsInSandbox: bool
726Name: string
726Parent: Instance
726PredictionMode: PredictionMode
726Sandboxed: bool
726UniqueId: 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
726children(): Instances
726clone(): Instance
726destroy(): null
726findFirstChild(name: string, recursive: bool = false): Instance
726getChildren(): Instances
726isDescendantOf(ancestor: Instance): bool
726remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
726childAdded(child: Instance)
inherited from Object
726ClassName: string
726className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
726isA(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 17

Members 7

BlurRadius

TypeDefault
UDim

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 2

Color

TypeDefault
Color3

This property determines the shadow's color.

History 2

Enabled

TypeDefault
bool

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

History 2

Offset

TypeDefault
UDim2

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

History 2

Spread

TypeDefault
UDim2

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 2

Transparency

TypeDefault
float

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

History 2

ZIndex

TypeDefault
int

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 2

Settings