Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make this text fade out script make text text fade out smoothly?

Asked by
glxymo 6
3 years ago
Edited 3 years ago

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

2 answers

Log in to vote
0
Answered by 3 years ago

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.

0
Thank you so much, I knew I was missing something! glxymo 6 — 3y
Ad
Log in to vote
0
Answered by
Hafrew 16
3 years ago

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

Answer this question