Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
TextDirection
Controls the base paragraph direction used when laying out text. Used by TextLabel.TextDirection, TextButton.TextDirection, and TextBox.TextDirection, which default to TextDirection.Auto.
TextDirection.Auto lets the Unicode Bidirectional Algorithm determine the paragraph's base direction from the first strong directional character. TextDirection.LeftToRight or TextDirection.RightToLeft pins the base direction regardless of content, which is useful for mixed-script strings where automatic detection would choose the wrong base.
Items
| Name | Value | Description |
|---|---|---|
| Auto | 0 | Automatically determines text direction from the first strong directional character using the Unicode Bidirectional Algorithm. |
| LeftToRight | 1 | Forces the paragraph base direction to left-to-right regardless of the text content. |
| RightToLeft | 2 | Forces the paragraph base direction to right-to-left regardless of the text content. |
Auto
Automatically determines text direction from the first strong directional character using the Unicode Bidirectional Algorithm.
| Field | Value |
|---|---|
| value | 0 |
LeftToRight
Forces the paragraph base direction to left-to-right regardless of the text content.
| Field | Value |
|---|---|
| value | 1 |
RightToLeft
Forces the paragraph base direction to right-to-left regardless of the text content.
| Field | Value |
|---|---|
| value | 2 |