Instances
UIGradient
Applies a two-endpoint colour and transparency gradient to its parent GUI object.
Properties
| Name | Type | Description |
|---|---|---|
Colour | ColourSequence | Two endpoint colours. Color is an alias. Default: white to white. |
Transparency | NumberSequence | Two endpoint transparencies from 0 through 1. Default: 0 to 0. |
Offset | Vector2 | Moves the gradient across the parent GUI. Each component is clamped from -1 through 1. Default: Vector2.zero. |
Rotation | number | Gradient rotation in degrees. Default: 0. |
Enabled | boolean | Controls whether the gradient is applied. Default: true. |
This UIGradient pass supports two endpoints.
ColorSequence.new / ColourSequence.new and NumberSequence.new expose Start and End values rather than arbitrary keypoints.UIGradient affects the parent GUI object's background, border and text rendering.
Example
Luau
local gradient = Instance.new("UIGradient")
gradient.Colour = ColourSequence.new(
Colour3.fromRGB(88, 255, 106),
Colour3.fromRGB(80, 145, 255)
)
gradient.Transparency = NumberSequence.new(0, 0.2)
gradient.Offset = Vector2.new(0, 0)
gradient.Rotation = 35
gradient.Enabled = true
gradient.Parent = workspace.Part.BillboardGui.TextButton