Timer Force Stopping

Hello! I am currently working on a minigame based project, where when 1 person remains the game ends. But I was wondering, how could I force stop a some code that looks like this? I don’t know if this is enough information to help me, but if it is not please tell me. I don’t need the 1 person remaining part, I just wanna know how I could force stop this code with so that the game wont just last until the timer ends. I would greatly appreciate any help, thank you!

for i=600, 0, -1 do
	Timer.Value = i
1 Like

Just have a variable outside of the loop thats toggled to true when the loop should break. Then, in the timer, check if that variable is equal to true every iteration. If it is, then break.

1 Like