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

How do you make text in a GUI fade in and out?

Asked by 6 years ago

Hey, I'm working on a Intro GUI for my game and I want the text to fade in. But I want to do it in a way where it won't look like this:

script.Parent.TextTransparency = 1
wait(0.1)
script.Parent.TextTransparency = .9
wait(0.1)
script.Parent.TextTransparency = .8
wait(0.1)
script.Parent.TextTransparency = .7
wait(0.1)
script.Parent.TextTransparency = .6
wait(0.1)
script.Parent.TextTransparency = .5
wait(0.1)
script.Parent.TextTransparency = .4
wait(0.1)
script.Parent.TextTransparency = .3
wait(0.1)
script.Parent.TextTransparency = .2
wait(0.1)
script.Parent.TextTransparency = .1
wait(0.1)
script.Parent.TextTransparency = 0
wait(0.1)

I've already tried:

for i 0.1,1 do
script.Parent.TextTransparency = i
wait(0.1)
end

And it didn't work. is there a way to make this work?

1 answer

Log in to vote
0
Answered by
CodeLad 31
6 years ago

Simple, try this.

for i = 1,0,-0.1 do
script.Parent.TextTransparency = i
wait(0.1)
end

You forgot the =

0
Thanks it worked! PixelZombieX 8 — 6y
Ad

Answer this question