Why does the gui show 2 text’s when a second player joins the game?

I am trying to make it show round and intermission times, but when another person is playing the game, the game bugs out and both the intermission and round timer keep coming up

local function LoopThrough(TimeGui, Seconds, Format)
	for i = Seconds, 0, -1 do
		local IntermissionFormat = string.format(Format, i)
		TimeGui.Frame.TextLabel.Text = IntermissionFormat
		wait(1)
	end
end

while true do
	local Restart = game.ReplicatedStorage.Restart
	local Teleport = game.ReplicatedStorage.Teleport
	local GameEnded = game.ReplicatedStorage.GameEnded
	for i,v in ipairs(game.Players:GetPlayers()) do
		local TimeGui = v.PlayerGui:FindFirstChild('TimeGui')
		if TimeGui then
			LoopThrough(TimeGui, 10, "Intermission: %s")
			Teleport:Fire()
			LoopThrough(TimeGui, 20, "Round: %s")
			Restart:Fire()
			GameEnded:Fire()
		end
	end
	wait()
end

I think a little more context is needed here. What do all those events do on the client?

This isn’t really descriptive. Would you mind elaborating on what is actually happening?

In general, I would not advise setting GUI-related stuff on the server. Perhaps use a RemoteEvent that pushes a time to clients to count down to? (Look at os.time() and tick() , if you send clients a countdown duration, latency will affect the timers.)