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

Why won't my GUI fade away with this script?

Asked by 9 years ago

I was making a new game and when I typed out this script, it mostly worked just not the fade part:

01while wait(6) do
02    script.Parent.N1.Visible = true
03    wait(1.5)
04    script.Parent.N2.Visible = true
05    wait(1.5)
06    script.Parent.N3.Visible = true
07    wait(1.5)
08    script.Parent.N4.Visible = true
09    wait(1.5)
10    script.Parent.N5.Visible = true
11    wait(1.5)
12    script.Parent.Parent:Fade()
13end

How do I fix this?

0
Im stumped supercoolboy8804 114 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Visible is a bool, so it only has two values true or false

If you want it to fade then you will have to use background transparency

1frame = -- The frame you want to fade away
2 
3 
4for i = 0, 1, 0.01 do -- at first i will equal 0 and each time it loops it will increase by 0.01
5    frame.BackgroundTransparency = i
6    wait(0.01)
7end

If you want to learn more about the for loop here is the wiki page

Ad

Answer this question