Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can you run for loops at the same time?

I was just wandering if I can have two for loops running at the same time. Here I have tried but It didn't work.

for i=1, 72000 do	
	roof.CFrame = roof.CFrame*CFrame.new(0,-0.01,0) 
	wait() 
wait(25)
for i=1,1400 do 
	door.CFrame = door.CFrame*CFrame.new(0,-0.01,0)
	wait()
end  
end

1 answer

Yes, you can do that. I don't see an error in your script except maybe the wait time? That's 25 seconds so you might just not be waiting long enough for it to happen, and if it loops 14,000 times in another loop that goes 72,000 times, that's an insanely long wait if you have 25 seconds intervals.

This discussion is preserved as it was. New answers, comments, and votes are closed.