PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

Text

TextButton

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 TextButton/TextColor3, TextButton/TextTransparency, TextButton/TextSize, TextButton/Font, TextButton/TextScaled, TextButton/TextWrapped, TextButton/TextXAlignment and TextButton/TextYAlignment.

It is possible to render emoji (for example, 😃) and other symbols. These special symbols aren’t affected by the TextButton/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


Show All Fonts

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


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.


"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.


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.


Emoji in Text

This code sample demonstrates emoji rendering using the Text property.