1 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

TextXAlignment

Determines horizontal alignment of text.

Used by TextLabel, TextButton, and TextBox.

Items

NameValueDescription
Left0Alignment starts at the left side of the GUI object.
Right1Alignment starts at the right side of the GUI object.
Center2Aligned starts at the center of the GUI object and spreads equally left and right.

Left

Alignment starts at the left side of the GUI object.

FieldValue
value0

Alignment starts at the right side of the GUI object.

FieldValue
value1

Center

Aligned starts at the center of the GUI object and spreads equally left and right.

FieldValue
value2