I am currently trying to make a clock with this type of format:
Currently my script runs very well, except when I get down to the single digit numbers (9, 8, 7, etc.), the clock says 0:X instead of 0:0X and I don’t know how to add a zero for only 1 digit numbers.
Also, if I wanted to make a minute, such as 1:30, how would I make it so it would take away a minute every 60 seconds?
Script is below:
local roundLength = 10
local intermissionLength = 30
local replicatedStorage = game:WaitForChild("ReplicatedStorage")
local roundPhase = replicatedStorage.RoundPhase
local roundTimer = replicatedStorage.RoundTimer
local inRound = replicatedStorage.InRound
local function phase()
while wait() do
for i = intermissionLength, 1, -1 do
inRound.Value = false
wait(1)
roundPhase.Value = "Phase: Intermission"
end
for i = roundLength, 1, -1 do
inRound.Value = false
wait(1)
roundPhase.Value = "Phase: Round"
end
end
end
local function timer()
while wait() do
for i = intermissionLength, 1, -1 do
roundTimer.Value = "0:" .. i
wait(1)
end
end
end
Thank you very much in advance.