Roblox UtilitiesDevlHub Roblox Documentation

Class

UIStroke

Inherits
UIComponent › UIBase › Instance › Object
Memory category
Instances

Applies an outline to text or a UI border.

UIStroke applies an outline to text or a UI border. Some properties may require enabling the Improved UIStrokes beta.

Key features include:

For more details on the UIStroke object, see Appearance Modifiers.

Properties 10#

ApplyStrokeModeApplyStrokeModeDetermines whether to apply the stroke to the object's border instead of the text itself.ReadSafe
BorderOffsetUDimSpecifies an additional offset to the stroke's position, relative to the parent's minimum height or width.ReadSafe
BorderStrokePositionBorderStrokePositionDetermines the stroke's position on its parent's border.ReadSafe
ColorColor3Determines the stroke color.ReadSafe
EnabledbooleanDetermines whether the stroke in visible.ReadSafe
LineJoinModeLineJoinModeDetermines how corners are interpreted.ReadSafe
StrokeSizingModeStrokeSizingModeDetermines whether the stroke's Thickness will be measured in pixels or be relative to the parent.ReadSafe
ThicknessfloatDetermines the stroke's thickness.ReadSafe
TransparencyfloatSets the stroke opacity independently of the parent object's BackgroundTransparency or TextTransparency.ReadSafe
ZIndexintDetermines the order in which the stroke renders relative to sibling UIStroke instances.ReadSafe

ApplyStrokeMode: ApplyStrokeMode#

ReadSafe

When a UIStroke instance is applied to a text object, this property determines whether to apply the stroke to the object's border instead of the text itself.

ApplyStrokeMode = Enum.ApplyStrokeMode.Contextual|Contextual
ApplyStrokeMode = Enum.ApplyStrokeMode.Border|Border

BorderOffset: UDim#

ReadSafe

This property specifies an additional offset (UDim) to the stroke's position, relative to the parent's minimum height or width.

BorderOffset = (0.15, 0)
BorderOffset = (0, -16)

BorderStrokePosition: BorderStrokePosition#

ReadSafe

This property determines the stroke's position on its parent's border as an BorderStrokePosition value.

BorderStrokePosition = Enum.BorderStrokePosition.Center|Center
BorderStrokePosition = Enum.BorderStrokePosition.Inner|Inner
BorderStrokePosition = Enum.BorderStrokePosition.Outer|Outer

Color: Color3#

ReadSafe

Determines the UIStroke color. You can also insert a UIGradient instance as a child to create gradient strokes.

Color = (0, 95, 225)
UIStroke with Class.UIGradient child

Enabled: boolean#

ReadSafe

This property determines whether the UIStroke is visible. When set to false, the stroke will not be rendered. Defaults to true.

LineJoinMode: LineJoinMode#

ReadSafe

This property determines how corners are interpreted. It accepts an LineJoinMode value of either Round (default), Bevel, or Miter.

LineJoinMode = Enum.LineJoinMode.Round|Round
LineJoinMode = Enum.LineJoinMode.Bevel|Bevel
LineJoinMode = Enum.LineJoinMode.Miter|Miter

StrokeSizingMode: StrokeSizingMode#

ReadSafe

This property determines whether the stroke's Thickness will be measured in pixels or be scaled relative to the parent. See StrokeSizingMode for further details.

Thickness: float#

ReadSafe

This property determines the stroke's thickness, measured in pixels (default) or scaled relative to the parent, depending on StrokeSizingMode.

Thickness = 4
Thickness = 12

Be mindful of tweening this UIStroke property when applied to text objects. This renders and stores many glyph sizes each frame, potentially causing performance issues or text flickering.

Transparency: float#

ReadSafe

This property sets the stroke opacity independently of the parent object's BackgroundTransparency or TextTransparency. This allows you to render text and borders that are "hollow" (consisting of only an outline).

Transparency = 0.5  ·  Class.TextLabel.TextTransparency = 0
Transparency = 0  ·  Class.TextLabel.TextTransparency = 1

ZIndex: int#

ReadSafe

This property determines the order in which the stroke renders relative to sibling UIStroke instances. Those with a lower ZIndex render under (behind) those with a higher ZIndex.

Note that the rendering order for UIStroke instances with the same ZIndex is undefined. Do not apply multiple UIStroke instances with the same ZIndex if their rendering order matters.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed