Why is this script not counting down?

I’m trying to make an in-game/lobby timer, but it just stays at the def. value.
In this, it’s 1:00, but it stays there.

local textLabel = script.Parent
local timerTime = 60
local timerMinutes = 0
local timerSeconds = 0
repeat
	wait(1)
	timerTime = timerTime - 1
	timerMinutes = math.floor(timerTime / 60)
	timerSeconds = timerTime - timerMinutes 
	textLabel.Text = timerMinutes + ":" + timerSeconds
until timerTime == 0

I’m not getting errors, the textLabel is not updating in-game.

To concatenate in lua, you have to use two dots. So you would do timerMinutes…”:”…timerSeconds

2 Likes

So, like this?

local textLabel = script.Parent
local timerTime = 60
local timerMinutes = 0
local timerSeconds = 0
repeat
	wait(1)
	timerTime = timerTime - 1
	timerMinutes = math.floor(timerTime / 60)
	timerSeconds = timerTime - timerMinutes 
	textLabel.Text = timerMinutes..":"..timerSeconds
until timerTime == 0

Yep. That should work as intended.

1 Like

Oh yeah, a side note:
I finished the timer script!
Thanks for helping with it, it means a lot.