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

TextTransparency

TextLabel

float

The TextColor3 property determines the transparency of all the text rendered by a UI element. This property along with TextLabel/Font, TextLabel/TextSize and TextLabel/TextColor3 will determine the visual properties of text. Text is rendered after the text stroke (TextLabel/TextStrokeTransparency).

Fading text in using a numeric for-loop is a fantastic way to draw a player’s attention to text appearing on screen.

-- Count backwards from 1 to 0, decrementing by 0.1
for i = 1, 0, -.1 do
   textLabel.TextTransparency = i
   wait(.1)
end


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.


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.