I'm trying to make a fun game that makes the certain objects teleport to each place, but I want to loop it.. Any ideas of how to make this loop? I want to make it loop infinite.
I've tried this:
while true do wait(132) end for i="Ib", math.huge do end repeat
Am I doing something wrong? I put another script into my original one to place that. Here's my complete script to the object.
while true do workspace.Ib:remove() game.Lighting.Ib1:Clone().Parent = game.Workspace wait(15) workspace.Ib1:remove() -- game.Lighting.Ib2:Clone().Parent = game.Workspace
wait(13) workspace.Ib2:remove() game.Lighting.Ib3:Clone().Parent = game.Workspace wait(10) workspace.Ib3:remove() game.Lighting.Ib4:Clone().Parent = game.Workspace wait(19) workspace.Ib4:remove() game.Lighting.Ib5:Clone().Parent = game.Workspace wait(25) workspace.Ib5:remove() game.Lighting.Ib6:Clone().Parent = game.Workspace wait(25) workspace.Ib6:remove() game.Lighting.Ib7:Clone().Parent = game.Workspace wait(25)
end
Im not sure what it does but this will loop it ^.^
while true do wait(13) workspace.Ib2:remove() game.Lighting.Ib3:Clone().Parent = game.Workspace wait(10) workspace.Ib3:remove() game.Lighting.Ib4:Clone().Parent = game.Workspace wait(19) workspace.Ib4:remove() game.Lighting.Ib5:Clone().Parent = game.Workspace wait(25) workspace.Ib5:remove() game.Lighting.Ib6:Clone().Parent = game.Workspace wait(25) workspace.Ib6:remove() game.Lighting.Ib7:Clone().Parent = game.Workspace wait(25) end
Well, Let me explain.
while true do
Only loops if there are waits.
Here is wrong way.
While true do script.Part.Transparency = 1 wait(0.3) script.Part.Transparency = 0
Correct way.
While true do wait(0.1) script.Part.Transparency = 1 wait(0.3) script.Part.Transparency = 0
Make sure you put a wait as soon as you finish "While true do"