I have a script that fires when a player steps on a part. The script is supposed to make the player invisible, but in a manner so that the player slowly gets more and more transparent. Here's the script: (note: I got rid of the non-important parts of the script)
local limbs = get.Parent:GetChildren() -- get is the argument for the Touched function in the script
for i = 1, #limbs do
if limbs[i].ClassName == "Part" then
repeat
wait()
limbs[i].Transparency = limbs[i].Transparency + 0.1
until
limbs[i].Transparency >= 1
limbs[i].Transparency = 1
end
end
Instead of decreasing all of the parts' transparency, it only decreases them one by one (i.e. the script will slowly turn 1 part transparent and that part only, and then move onto the next part until all parts are transparent). Why is this happening, and how can I fix it?
