Minuts Hours System problem!

So I was trying to create a timer for my boosts but they don’t work, and instead of 11:1, I want it to be 11:01. The tutorails I looked I din’t really understand. This is the script I got but it doesn’t work. So can someone help me please.

local player = game.Players.LocalPlayer
local timerText = script.Parent

player.Values.BoostLuckTime:GetPropertyChangedSignal("Value"):Connect(function()
	local minutes = player.Values.BoostLuckTime.Value / 60
	local seconds = player.Values.BoostLuckTime.Value - minutes * 60
	timerText.Text = (string.format("%02d: %02d", minutes, seconds))
end)

Also its impossible to get over one hour so there don’t have to be any hours!

1 Like
local boost = something.Value --boost.Value here

local minutes = math.floor(boost / 60)
local seconds = math.floor(boost % 60)
if seconds < 10 then
    seconds = tostring("0"..seconds)
end

Hope this helps!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.