I have 4 parts which are labeled in myTable. I'm trying to make them go up 0.1 every 0.2 seconds. Then I want my script to detect that a part has hit Transparency 1 and break it's loop and continue on to my next statement. This will basically do the same but opposite. (Starting from 1, it'll go down 0.1 every 0.2 seconds)
myTable = {game.Workspace.one,game.Workspace.two,game.Workspace.three,game.Workspace.four}
while true do
for i,v in pairs (myTable) do
v.Transparency = v.Transparency + 0.1
wait(0.2)
if v.Transparency == 1 then
break
end
if v.Transparency == 1 then
for i,v in pairs (myTable) do
v.Transparency = v.Transparency - 0.1
wait(0.2)
end
end
end
end
Also, how would I make this stop at 0 transparency and do +0.1 and repeat this over and over? I can't figure it out. Do I need a whole new code?

2 comments
Do you want all of them to change at the same time?
No, I wanted it to go one then two, three, and four. Then repeat both functions Perci gave but I can probably edit some things along with his.