✓ Accepted answer
You are only looping through 10 times, so the transparency is only reaching 0.2.
Assuming you are starting at 0 transparency and want to fade all the way to fully transparent, you can do something like this:
for i = 0, 1, 0.02 do
wait(0.1)
script.Parent.BackgroundTransparency = i
end
The first number is the starting value, the second is the ending value, and the third number is how much you want to increment 'i' each time you pass through the loop.
And we set BackgroundTransparency to i, so it will be fully transparent when the loop ends, since our ending value is 1.
Any questions or confusion? Just ask! Hope this helps.
4 comments
What exactly are you having an issue with?
Fading in the GUI
is it not working or what?
Most people do for i = 0, 1 do whatever.BackgroundTransparency = i (or something similar). As for the error itself, are you certain script.Parent.BackgroundTransparency isn't already 1?