I'm making a break system for my game, but the countdown stops every time I test the game.
The script I've made so far:
local timer = game.StarterGui.Timer.TimerText
local lobbyMusic = game.Workspace.Sounds.Intermission
local inGameMusic = game.Workspace.Sounds.InGame
local storage = game:GetService("ReplicatedStorage")
local intermissionCountdown = storage.Values.IntermissionCounter
local ingameCountdown = storage.Values.InGameCounter
local status = storage.Values.Status
local maps = storage.Maps
if status.Value == "Intermission" then
repeat wait(1)
intermissionCountdown.Value = intermissionCountdown.Value - 1
timer.Text = "Intermission:" ..intermissionCountdown.Value
until intermissionCountdown.Value <= 0
end

1 comment
Or a while loop checking if the countdown is still over 0