Next Process not working?

Hallo Developers,

I’m making a game with minigames. I’m only working on a process when someone reset it will stop and go to the next process.

	for i = 1, #players do
		local randomizedNumber = math.random(1,8)
		players[i].Character.Head.CFrame = CFrame.new(game.Workspace.GameSystem.Teleports["Part"..randomizedNumber].Position)
		players[i].Character.Parent = game.Workspace.GameSystem.playersIngame
		if game.Workspace.GameSystem.playersIngame ~= 0 then
			next()
		end
	end
	
	ticking_clock = 60
	
	repeat
		ticking_clock = ticking_clock - 1
		status.Value = ticking_clock.." seconds left!"
		wait(1)
	until ticking_clock == 0 or values.WinnerValue.Value ~= ""

Hopefully someone can help me. it is going about this it will stop! If you need the whole script and have maybe a idea send me a DM on discord please!

Discord: cyrloxx#0001