Reference API Roblox

Engine API

Website

Related

Reference API Roblox

UIStroke

Applies an outline to text or a UI border.

Member index 10

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

Description

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.

History 43

Members 10

ApplyStrokeMode

TypeDefault
ApplyStrokeModeContextual

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 = Contextual
ApplyStrokeMode = Border

History 5

BorderOffset

TypeDefault
UDim0, 0

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)

History 3

BorderStrokePosition

TypeDefault
BorderStrokePositionOuter

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

BorderStrokePosition = Center
BorderStrokePosition = Inner
BorderStrokePosition = Outer

History 3

Color

TypeDefault
Color30, 0, 0

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

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

History 5

Enabled

TypeDefault
booltrue

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

History 5

LineJoinMode

TypeDefault
LineJoinModeRound

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

LineJoinMode = Round
LineJoinMode = Bevel
LineJoinMode = Miter

History 5

StrokeSizingMode

TypeDefault
StrokeSizingModeFixedSize

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.

History 3

Thickness

TypeDefault
float1

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.

History 5

Transparency

TypeDefault
float0

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  ·  TextLabel.TextTransparency = 0
Transparency = 0  ·  TextLabel.TextTransparency = 1

History 5

ZIndex

TypeDefault
int1

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.

History 3

Settings