I’m trying to make a for loop that iterates over a table of parts and changes the transparency of all of them at once. Everything is working fine; however, the i value in my for loop is outputting as 0.950000000000003 on the final iteration, causing the script to not run again, thus not making the parts fully transparent. Is there any fix I can do other than hard-coding an extra iteration of the loop?
for i = 0, 1, math.round(0.05*100)/100 do
i = math.round(i*100)/100
for index, part in parts do
part.Transparency = i
end
wait(0.01)
end