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 8 years ago

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

while wait(6) do
    script.Parent.N1.Visible = true
    wait(1.5)
    script.Parent.N2.Visible = true
    wait(1.5)
    script.Parent.N3.Visible = true
    wait(1.5)
    script.Parent.N4.Visible = true
    wait(1.5)
    script.Parent.N5.Visible = true
    wait(1.5) 
    script.Parent.Parent:Fade()
end

How do I fix this?

0
Im stumped supercoolboy8804 114 — 8y

1 answer

Log in to vote
0
Answered by 8 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

frame = -- The frame you want to fade away


for i = 0, 1, 0.01 do -- at first i will equal 0 and each time it loops it will increase by 0.01
    frame.BackgroundTransparency = i 
    wait(0.01)
end

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

Ad

Answer this question