I forgot how to fade something using a for loop, any help?
This is the code I have so far.
while true do wait() for i = 1,10 do wait() script.Parent.Tex.Transparency = script.Parent.Tex.Transparency/i print(script.Parent.Tex.Transparency) end end
The way you're changing the transparency doesn't make the most sense.
The most reasonable way to fade something from 1 to 0 in 10 steps takes these values:
What you're doing is... very strange?
Notice that each step just decreases it by 0.1
. Do that!
script.Parent.Tex.Transparency = script.Parent.Tex.Transparency - 0.1