Intermission timer not working as intended

Hi, so I wanted to make a working intermission timer that counts down from 10 to 1, then starts the game.



  1. So I tried to look if anything is wrong, but tbh I can’t seem to find what’s wrong with my code after looking at this article below.
    How can I make a intermission script? - #20 by TheHungbao

This is my code in serverScriptService

local REPLICATEDSTORAGE = game:GetService("ReplicatedStorage")
local CountdownTime = 10 --Intermission time
local intermissionEvent = REPLICATEDSTORAGE.IntermissionEvent

repeat
	CountdownTime  -= 1
	--Make CountdownTime update to clients (gui, surfacegui etc)
	intermissionEvent:FireAllClients(CountdownTime)
until CountdownTime  == 0

This is my code in StarterGui

local remoteEvent = game.ReplicatedStorage.IntermissionEvent

remoteEvent.OnClientEvent:Connect(function(CountdownNumber)
	game.StarterGui.ScreenGui.TextLabel.Text = "Intermission :".. CountdownNumber
end)

If you know any solutions or links that might help solve this problem, your help is much appreciated.

everything in StarterGui is cloned to Player.PlayerGui when the player joins the game,
Change:

To:

game.Players.LocalPlayer.PlayerGui.ScreenGui.TextLabel.Text = "Intermission :".. CountdownNumber
2 Likes

You could also add a wait(), otherwise it’ll just decrease the time very quick.

repeat
wait(1) -- waits one second to change
	CountdownTime  -= 1
	intermissionEvent:FireAllClients(CountdownTime)
until CountdownTime  == 0
1 Like