Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
AutomaticSize
UI objects with AutomaticSize enabled will increase in size up to maximum size allowed by the parent (if there is one) and no smaller than the Size property bounds. To enable AutomaticSize, set the value to an enum value other than None.
This enum is used by GuiObject.AutomaticSize and ScrollingFrame.AutomaticCanvasSize to determine whether and how resizing occurs based on child content.
For more information, see Automatic Sizing.
Items
| Name | Value | Description |
|---|---|---|
| None | 0 | Default sizing behavior. |
| X | 1 | Automatically resize element along the X axis to fit child contents. |
| Y | 2 | Automatically resize element along the Y axis to fit child contents. Text objects will only resize along the Y axis if their TextWrapped property is enabled. |
| XY | 3 | Automatically resize element along the X and Y axes to fit child contents. |
None
Default sizing behavior.
| Field | Value |
|---|---|
| value | 0 |
X
Automatically resize element along the X axis to fit child contents.
| Field | Value |
|---|---|
| value | 1 |
Y
Automatically resize element along the Y axis to fit child contents. Text objects will only resize along the Y axis if their TextWrapped property is enabled.
| Field | Value |
|---|---|
| value | 2 |
XY
Automatically resize element along the X and Y axes to fit child contents.
| Field | Value |
|---|---|
| value | 3 |