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
4 years ago
Edited 4 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:

1for loop = 1,10 do
2    wait(0.3
3    script.Parent.BackgroundTransparency = loop/10
4    wait(0.3)
5    script.Parent.TextTransparency = loop/10
6        game:GetService("RunService").Stepped:Wait()
7    end
8script.Parent.BackgroundTransparency = loop/10

2 answers

Log in to vote
0
Answered by 4 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 — 4y
Ad
Log in to vote
0
Answered by
Hafrew 16
4 years ago

if you dont know how to tween then:

01wait(0.1)
02script.Parent.BackgroundTransparency = 0.9
03wait(0.1)
04script.Parent.BackgroundTransparency = 0.8
05wait(0.1)
06script.Parent.BackgroundTransparency = 0.7
07wait(0.1)
08script.Parent.BackgroundTransparency = 0.6
09wait(0.1)
10script.Parent.BackgroundTransparency = 0.5
11wait(0.1)
12script.Parent.BackgroundTransparency = 0.4
13wait(0.1)
14script.Parent.BackgroundTransparency = 0.3
15wait(0.1)
16script.Parent.BackgroundTransparency = 0.2
17wait(0.1)
18script.Parent.BackgroundTransparency = 0.1
19wait(0.1)
20script.Parent.BackgroundTransparency = 0

Answer this question