UIStroke
Draw an outline around a GUI element or its text.
UIStroke is a UI modifier that outlines its parent. It can stroke the object's border, the text, or both, depending on ApplyStrokeMode.
Getting started
local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(20, 20, 20)
stroke.Thickness = 2
stroke.Transparency = 0
stroke.Parent = labelProperties
| Property | Type | Access | Description |
|---|---|---|---|
Enabled | boolean | Read/write | Whether the stroke renders. |
Color | Color3 | Read/write | Stroke color. |
Transparency | number | Read/write | Stroke transparency, clamped to 0 through 1. |
Thickness | number | Read/write | Stroke width, clamped to 0 or above. |
ApplyStrokeMode | Enum.ApplyStrokeMode | Read/write | What the stroke applies to. |
Notes
Thicknessnever goes negative; negative writes store0.Transparencyclamps rather than raising.ApplyStrokeModeselects between the object border, text, and context-dependent behavior.- Modifiers apply to the parent GUI object.
- Cloning copies every stroke setting.
See also
UICornerfor rounded corners.TextLabelandTextButtonfor the text the stroke can outline.
