Dividing not working

Hey guys!

I’m having trouble with dividing numbers and this isn’t a joke I know it sounds like one tho
I need help with figuring out why the code spits out random number instead of dividing
Like when i do 120/60 i should get 2 but get 143.6
Heres the part of code:

local timer = 180 + (#game.Teams.Playing:GetChildren() * 30)
	local secs = timer%60
	local mins = math.floor(timer-secs/60)
	
   repeat
		timer -= 1
		timer = math.round(timer)
		secs = timer%60
		secs = math.round(secs)
		mins = math.floor(timer-secs/60)
		print(timer-secs)
		print(timer-secs/60)
		game.ReplicatedStorage.ShowText:FireAllClients(mins..":"..secs)
		task.wait(1)
   until #game.Teams.Playing:GetPlayers() == 0 or timer <= 0

should print 120 then 2
note: it 120 to stop getting decimals
Screenshot 2025-12-24 153139
any help will be appreciated thanks!

and dont mind that i accidentally did GetChildren() and not GetPlayers() its not related

Simple case of order of operations. You mean to do (timer-secs)/60 when initially definining mins, but you repeatedly do timer - secs/60 which will divide seconds by 60 first, and then subtract that from timer.