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

TextSize

TextLabel

float

The TextSize property determines the height in offsets of one line of rendered text. The unit is in offsets, not points (which is used in most document editing programs). It’s worth noting that the “Legacy” font’s line height behaves differently, and won’t match this property exactly.

This property and TextLabel/TextColor3, TextLabel/TextTransparency, TextLabel/TextStrokeColor3 and TextLabel/TextStrokeTransparency each influence the way text is rendered.

This property supersedes TextLabel/FontSize since it is a number and not an enum. Internally, Roblox uses several sets of pre-rendered character images for each size of each font. It chooses the closest size to TextSize, then scales that set of character images to render text. Before the introduction of this property, you could only pick from the pre-rendered sizes, which were listed by the Enum/FontSize enum.


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.