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

I made a for loop for fading in something and it doesnt work?

Asked by 7 years ago

This is Fade in For loop is not working. Help!

wait()
for i = 0,1.5,0.05 do
    wait(0.1)
    script.Parent.BackgroundTransparency = i
end

1 answer

Log in to vote
0
Answered by 7 years ago

1.5 is not a valid transparency, its 0 through 1, visible to transparent. if you want to fade into existence, you don't swap the first two values, but instead use a negative change

for i = 1,0,-.1 do
    script.Parent.Transparency = i
    wait(.1)
end
Ad

Answer this question