PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

Text

TextLabel

string

The Text property determines the content rendered by the UI element. The visual properties of the string rendered to the screen is determined by TextLabel/TextColor3, TextLabel/TextTransparency, TextLabel/TextSize, TextLabel/Font, TextLabel/TextScaled, TextLabel/TextWrapped, TextLabel/TextXAlignment and TextLabel/TextYAlignment.

It is possible to render emoji (for example, 😃) and other symbols. These special symbols aren’t affected by the TextLabel/TextColor3 property. These can be pasted into Script and LocalScript objects, as well as the field within the Properties window.

This property may contain newline characters, however, it is not possible to type newline characters within the Properties window. Similarly, this property may contain a tab character, but it will render as a space instead.


Code Samples


"Kaboom!" Text

This code sample repeatedly tweens a TextLabel’s TextSize from 5 to 100 and fades out the text as it grows in size.


Show All Fonts

This code sample renders a list of all the available fonts.


Long Text Wrapping

This code sample demonstrates TextWrap by spelling out a long chunk of text progressively. If the text doesn’t fit, it turns a different color.


Fading Banner

This code sample creates a fading banner for a TextLabel. It fades text out, chooses a random string (avoiding repetition), and fades back in.


Emoji in Text

This code sample demonstrates emoji rendering using the Text property.