Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

1 comment

0

Thank you so much, I knew I was missing something!

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

This discussion is preserved as it was. New answers, comments, and votes are closed.