Collapse Sidebar




The TextSize property determines the pixel height of one line of rendered text. The unit is in screen pixels, 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.

local textLabel = script.Parent

textLabel.Text = "Kaboom!"

while true do
	for size = 5, 100, 5 do
		textLabel.TextSize = size
		textLabel.TextTransparency = size / 100