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

Fading load screen doesn't fade?

Asked by 8 years ago
script.Parent.BackgroundTransparency=0
wait(3)
for i=.1,1, .1 do
    wait(.30)
    i=script.Parent.BackgroundTransparency
end
print(script.Parent.Parent.Name .. " has finished.")
script.Parent.Parent:Destroy()

It only stays black...waits...then removes it. It doesn't fade! The script is a LocalScript so i cant see the problem. Please help!

0
I just noticed i need to create it again everytime someone joins so it will do it again, but that dosnt matter, i need to know how to make it fade. zachattack220 25 — 8y

1 answer

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
8 years ago

To fade you need a For Loop counting up, not down. You want the transparency to be 1 to completely fade it

script.Parent.BackgroundTransparency=0
wait(3)
for i = 1,10 do
    wait(.30)
    script.Parent.BackgroundTransparency = i / 10
end
print(script.Parent.Parent.Name .. " has finished.")
script.Parent.Parent:Destroy()
Ad

Answer this question