How Do I Run For Loops Again?

Hello I want to make an easy round system,
I did most of it but I cant figure out how to run for loops again

Here is the script :

local RoundTime = 5
local Intermission = 5
local TextButton = script.Parent

while true do
	while Intermission > 0 do
		TextButton.Text = "Round Staring In: " .. Intermission
		wait(1)
		Intermission = Intermission - 1	
	end

	TextButton.Text = "Round Starting"
	wait(1)

	while RoundTime > 0 do
		TextButton.Text = "Remaining: " .. RoundTime
		wait(1)
		RoundTime = RoundTime - 1	
	end

	TextButton.Text = "Round Ending"
	wait(1)
end

when I play the game, after it counts down RoundTime and Intermission it repeats, Round Starting and Round Ending

1 Like

This will make that loop run indefinitely, with each iteration remaining the same. If you desire something else, then feel free to elaborate further.

local RoundTime = 5
local Intermission = 5
local TextButton = script.Parent

while true do
	local roundTime = RoundTime
	local intermission = Intermission
	
	while intermission > 0 do
		TextButton.Text = "Round Staring In: " .. intermission
		wait(1)
		intermission = intermission - 1	
	end

	TextButton.Text = "Round Starting"
	wait(1)

	while roundTime > 0 do
		TextButton.Text = "Remaining: " .. roundTime
		wait(1)
		roundTime = roundTime - 1	
	end

	TextButton.Text = "Round Ending"
	wait(1)
end
1 Like