Timer full of random nums

Hello!
I am trying to make a timer with a ticked variable

local TimePassed = tick()

while self.Status == "started" do
	if tick()-TimePassed >= 60 then self.Status = "break" break end
	
	wait(1)
	
	self.Obj.PrimaryPart.Beep:play()
	self.Obj.PrimaryPart.TimerGui.Label.Text = "BREAKING IN "..math.round(60-TimePassed)
end

And it displays random numbers instead of how much time is left

Capture

Because you are subtracting tick() from 60 (On line 9). And tick() is a very big number thus making a very large negative number.

2 Likes

Oh, I just replcaed

math.round(60-TimePassed)

with

math.round(60-(tick()-TimePassed))

thanks by the way.