Right now it's kind of buggy and it doesn't look smooth. Also the text reappears when the text fades out. Help Please!
Note: This script is put inside a text label.
Note: It's a LocalScript not a normal script.
Fade Script:
for loop = 1,10 do wait(0.3) script.Parent.BackgroundTransparency = loop/10 wait(0.3) script.Parent.TextTransparency = loop/10 game:GetService("RunService").Stepped:Wait() end script.Parent.BackgroundTransparency = loop/10
I HIGHLY recommend using Tweening for this.
By using a Tween to animate the text, you can manipulate how the text fades out, what speed it fades at, and more within the TweenInfo. More about GUI-related tweening here.
if you dont know how to tween then:
wait(0.1) script.Parent.BackgroundTransparency = 0.9 wait(0.1) script.Parent.BackgroundTransparency = 0.8 wait(0.1) script.Parent.BackgroundTransparency = 0.7 wait(0.1) script.Parent.BackgroundTransparency = 0.6 wait(0.1) script.Parent.BackgroundTransparency = 0.5 wait(0.1) script.Parent.BackgroundTransparency = 0.4 wait(0.1) script.Parent.BackgroundTransparency = 0.3 wait(0.1) script.Parent.BackgroundTransparency = 0.2 wait(0.1) script.Parent.BackgroundTransparency = 0.1 wait(0.1) script.Parent.BackgroundTransparency = 0