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

playing events in order? (recorder)

I am trying to make a recorder, and part of that is to make the events play with good timing. I have saved all times of the events from the start of recording session, like a value of 1 would happen 1 second after play is hit and a value of 2 will happen 2 seconds after play is hit.

I was wondering if there was a way to do this- I tried having a for loop with waits but that didn't work, as it just waited each value out (1 and 2, 2 would happen 3 seconds after play).

Thanks.

1 answer

You could put a value in the start of the script, and have the value increase/decrease at the end of an event. When the value hits a certain number, it starts another event. For example:

x = 0
game.Players.PlayerAdded:connect(function(player)
	--stuff
	wait(5)
	x = x + 1
	end
end

if x == 1 do
	--another event here
end

I think this could work, theoretically. Good luck.

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