Instances
TextLabel
A GUI object that draws text in Glorpia GUI containers with selectable font families and styles.
Defaults and properties
| Name | Type | Description |
|---|---|---|
Size | UDim2 | Default: UDim2.new(0, 100, 0, 50). |
Position | UDim2 | Position relative to the parent GUI. Default: UDim2.new(0, 0, 0, 0). |
AnchorPoint | Vector2 | Point inside the TextLabel that Position is anchored to. Default: Vector2.new(0, 0). |
BackgroundColour3 | Colour3 | Background colour. Default: white. BackgroundColor3 remains available as a compatibility alias. |
BackgroundTransparency | number | Background transparency from 0 through 1. Default: 0. |
Text | string | Displayed text. Default: TextLabel. |
TextSize | number | Text size in pixels. Default: 14. |
TextFits | boolean | Read-only. True when the current rendered text fits inside the TextLabel bounds. |
TextScaled | boolean | Scales text to the largest size that still fits inside the TextLabel. Enabling TextScaled also enables TextWrapped. Default: false. |
TextWrapped | boolean | Wraps text onto multiple lines inside the TextLabel. Disabling TextWrapped also disables TextScaled. Default: false. |
TextTruncate | Enum.TextTruncate | Controls how text that does not fit is truncated. Default: Enum.TextTruncate.None. |
TextDirection | Enum.TextDirection | Controls text flow direction. Auto detects direction from the text. Default: Enum.TextDirection.Auto. |
TextXAlignment | Enum.TextXAlignment | Horizontal text alignment. Default: Enum.TextXAlignment.Center. |
TextYAlignment | Enum.TextYAlignment | Vertical text alignment. Default: Enum.TextYAlignment.Center. |
TextTransparency | number | Text transparency from 0 through 1. Default: 0. |
TextColour3 | Colour3 | Text colour. Default: black. TextColor3 remains available as a compatibility alias. |
Font | Enum.Font | Font family. Default: Enum.Font.Metropolis. |
FontStyle | Enum.FontStyle | Font style supported by the selected Font. Default: Enum.FontStyle.Normal. |
Visible | boolean | Controls whether the TextLabel is drawn. Default: true. |
Rotation | number | Clockwise rotation in degrees around the label centre. Default: 0. |
ZIndex | number | Sibling-scoped GUI draw order. Higher values draw above sibling GUI objects. Descendants remain inside the parent stacking context. Default: 1. |
ClipDescendants | boolean | Clips GUI descendants to the TextLabel bounds. Default: false. |
Interactable | boolean | Controls whether the GUI object can participate in GUI interaction. Default: true. |
Modal | boolean | When true, right-click camera movement is allowed through this GUI object while the pointer is over it. Default: false. |
BorderColour3 | Colour3 | Border colour. Default: black. BorderColor3 is a compatibility alias. |
BorderMode | Enum.BorderMode | Border placement. Default: Enum.BorderMode.Outline. |
BorderSizePixel | number | Border thickness in pixels. Default: 0. Disabled in Studio while a UICorner is parented to the TextLabel. |
The Font picker lists every supported family. Families with Studio preview font data are previewed in that face; raster-backed families use the Studio UI fallback in the picker. The FontStyle picker only lists styles that exist for the selected family. Scripts use
Enum.Font and Enum.FontStyle.Text layout metrics currently target printable ASCII characters U+0020 through U+007E. Skia can draw additional glyphs present in the selected font, but those characters use fallback layout metrics until full Unicode shaping is added.
TextScaled = true automatically enables TextWrapped. Setting TextWrapped = false automatically disables TextScaled, so TextScaled cannot remain enabled without wrapping.Font families
| Name | Type | Description |
|---|---|---|
Enum.Font.Metropolis | Enum.Font | Metropolis. Default family. |
Enum.Font.Arima | Enum.Font | Arima. |
Enum.Font.Arimo | Enum.Font | Arimo. |
Enum.Font.Audiowide | Enum.Font | Audiowide. |
Enum.Font.Basic | Enum.Font | Basic. |
Enum.Font.Cantarell | Enum.Font | Cantarell. |
Enum.Font.Cinzel | Enum.Font | Cinzel. |
Enum.Font.ComicRelief | Enum.Font | Comic Relief. |
Enum.Font.Commissioner | Enum.Font | Commissioner. |
Enum.Font.Creepster | Enum.Font | Creepster. |
Enum.Font.EagleLake | Enum.Font | Eagle Lake. |
Enum.Font.Eater | Enum.Font | Eater. |
Enum.Font.Flavors | Enum.Font | Flavors. |
Enum.Font.FontdinerSwanky | Enum.Font | Fontdiner Swanky. |
Enum.Font.GrandHotel | Enum.Font | Grand Hotel. |
Enum.Font.HennyPenny | Enum.Font | Henny Penny. |
Enum.Font.IBMPlexMono | Enum.Font | IBM Plex Mono. |
Enum.Font.JollyLodger | Enum.Font | Jolly Lodger. |
Enum.Font.JotiOne | Enum.Font | Joti One. |
Enum.Font.Knewave | Enum.Font | Knewave. |
Enum.Font.PasseroOne | Enum.Font | Passero One. |
Enum.Font.Rowdies | Enum.Font | Rowdies. |
Enum.Font.RubikDistressed | Enum.Font | Rubik Distressed. |
Enum.Font.ShortStack | Enum.Font | Short Stack. |
Enum.Font.Silkscreen | Enum.Font | Silkscreen. |
Enum.Font.Bytesized | Enum.Font | Bytesized. |
Enum.Font.DynaPuff | Enum.Font | DynaPuff. |
Enum.Font.FiraCode | Enum.Font | Fira Code. |
Enum.Font.LobsterTwo | Enum.Font | Lobster Two. |
Enum.Font.Matemasie | Enum.Font | Matemasie. |
Enum.Font.Miltonian | Enum.Font | Miltonian. |
Enum.Font.Monoton | Enum.Font | Monoton. |
Enum.Font.Montserrat | Enum.Font | Montserrat. |
Enum.Font.Oswald | Enum.Font | Oswald. |
Enum.Font.PermanentMarker | Enum.Font | Permanent Marker. |
Enum.Font.PressStart2P | Enum.Font | Press Start 2P. |
Enum.Font.Rubik | Enum.Font | Rubik. |
Enum.Font.RubikWetPaint | Enum.Font | Rubik Wet Paint. |
Enum.Font.Rye | Enum.Font | Rye. |
Enum.Font.Tiny5 | Enum.Font | Tiny5. |
Enum.Font.AmaticSC | Enum.Font | Amatic SC. |
Enum.Font.Bangers | Enum.Font | Bangers. |
Enum.Font.ComicNeue | Enum.Font | Comic Neue. |
Enum.Font.DenkOne | Enum.Font | Denk One. |
Enum.Font.Inconsolata | Enum.Font | Inconsolata. |
Enum.Font.IndieFlower | Enum.Font | Indie Flower. |
Enum.Font.JosefinSans | Enum.Font | Josefin Sans. |
Enum.Font.Jura | Enum.Font | Jura. |
Enum.Font.Kalam | Enum.Font | Kalam. |
Enum.Font.Merriweather | Enum.Font | Merriweather. |
Enum.Font.Michroma | Enum.Font | Michroma. |
Enum.Font.Nunito | Enum.Font | Nunito. |
Enum.Font.PatrickHand | Enum.Font | Patrick Hand. |
Enum.Font.Roboto | Enum.Font | Roboto. |
Enum.Font.RobotoCondensed | Enum.Font | Roboto Condensed. |
Enum.Font.RobotoMono | Enum.Font | Roboto Mono. |
Enum.Font.Sarpanch | Enum.Font | Sarpanch. |
Enum.Font.SourceSans3 | Enum.Font | Source Sans 3. |
Enum.Font.SpecialElite | Enum.Font | Special Elite. |
Enum.Font.TitilliumWeb | Enum.Font | Titillium Web. |
Enum.Font.Ubuntu | Enum.Font | Ubuntu. |
Font styles
Enum.FontStyle includes Thin, ThinItalic, ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black and BlackItalic. Each family exposes only the styles included with that font.
Assigning a Font automatically falls back to
Enum.FontStyle.Normal if the previous style is not supported by the new family.Styles supported by each family
| Name | Type | Description |
|---|---|---|
Metropolis | Thin, ThinItalic, ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black, BlackItalic | |
Arima | Thin, ExtraLight, Light, Normal, Medium, SemiBold, Bold | |
Arimo | Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic | |
Audiowide | Normal | |
Basic | Normal | |
Cantarell | Normal, Italic, Bold, BoldItalic | |
Cinzel | Normal, Medium, SemiBold, Bold, ExtraBold, Black | |
Comic Relief | Normal, Bold | |
Commissioner | Thin, ExtraLight, Light, Normal, Medium, SemiBold, Bold, ExtraBold, Black | |
Creepster | Normal | |
Eagle Lake | Normal | |
Eater | Normal | |
Flavors | Normal | |
Fontdiner Swanky | Normal | |
Grand Hotel | Normal | |
Henny Penny | Normal | |
IBM Plex Mono | Thin, ThinItalic, ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic | |
Jolly Lodger | Normal | |
Joti One | Normal | |
Knewave | Normal | |
Passero One | Normal | |
Rowdies | Light, Normal, Bold | |
Rubik Distressed | Normal | |
Short Stack | Normal | |
Silkscreen | Normal, Bold | |
Bytesized | Normal | |
DynaPuff | Normal, Medium, SemiBold, Bold | |
Fira Code | Light, Normal, Medium, SemiBold, Bold | |
Lobster Two | Normal, Italic, Bold, BoldItalic | |
Matemasie | Normal | |
Miltonian | Normal | |
Monoton | Normal | |
Montserrat | Thin, ThinItalic, ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black, BlackItalic | |
Oswald | ExtraLight, Light, Normal, Medium, SemiBold, Bold | |
Permanent Marker | Normal | |
Press Start 2P | Normal | |
Rubik | Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black, BlackItalic | |
Rubik Wet Paint | Normal | |
Rye | Normal | |
Tiny5 | Normal | |
Amatic SC | Normal, Bold | |
Bangers | Normal | |
Comic Neue | Light, LightItalic, Normal, Italic, Bold, BoldItalic | |
Denk One | Normal | |
Inconsolata | ExtraLight, Light, Normal, Medium, SemiBold, Bold, ExtraBold, Black | |
Indie Flower | Normal | |
Josefin Sans | Thin, ThinItalic, ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic | |
Jura | Light, Normal, Medium, SemiBold, Bold | |
Kalam | Light, Normal, Bold | |
Merriweather | Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black, BlackItalic | |
Michroma | Normal | |
Nunito | ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black, BlackItalic | |
Patrick Hand | Normal | |
Roboto | Thin, ThinItalic, ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black, BlackItalic | |
Roboto Condensed | Thin, ThinItalic, ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black, BlackItalic | |
Roboto Mono | Thin, ThinItalic, ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic | |
Sarpanch | Normal, Medium, SemiBold, Bold, ExtraBold, Black | |
Source Sans 3 | ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, Medium, MediumItalic, SemiBold, SemiBoldItalic, Bold, BoldItalic, ExtraBold, ExtraBoldItalic, Black, BlackItalic | |
Special Elite | Normal | |
Titillium Web | ExtraLight, ExtraLightItalic, Light, LightItalic, Normal, Italic, SemiBold, SemiBoldItalic, Bold, BoldItalic, Black | |
Ubuntu | Light, LightItalic, Normal, Italic, Medium, MediumItalic, Bold, BoldItalic |
Example
Luau
local label = Instance.new("TextLabel")
label.Size = UDim2.new(0, 100, 0, 50)
label.AnchorPoint = Vector2.new(0, 0)
label.Text = "TextLabel"
label.TextSize = 14
label.TextWrapped = true
label.TextScaled = false
label.TextTruncate = Enum.TextTruncate.AtEnd
label.TextDirection = Enum.TextDirection.Auto
label.TextXAlignment = Enum.TextXAlignment.Center
label.TextYAlignment = Enum.TextYAlignment.Center
print(label.TextFits)
label.BackgroundColour3 = Colour3.fromRGB(255, 255, 255)
label.TextColour3 = Colour3.fromRGB(0, 0, 0)
label.TextTransparency = 0
label.Font = Enum.Font.Metropolis
label.FontStyle = Enum.FontStyle.Bold
label.BorderColour3 = Colour3.fromRGB(0, 0, 0)
label.BorderMode = Enum.BorderMode.Outline
label.BorderSizePixel = 0
label.Visible = true
label.Rotation = 0
label.ZIndex = 1
label.ClipDescendants = false
label.Interactable = true
label.Parent = workspace.Part.BillboardGui