Keeping track of minutes

I’m trying to increase a value with every minute that passes based on UTC time, but the value resets whenever a new hour is hit and minutes are back to 0. How can I keep track of every minute that passes?

while wait() do
	local currentTime = os.date("!*t")
	local currentMin = currentTime.min
	balanceValue.Value = 100 * (currentMin - tonumber(interactedMinute.Value))
	-- interactedMinute holds the minutes of the time a button was pressed. (if the time was 05:42:26, the value is 42)
end
2 Likes

u probably have to add the value of minutes whenever 60 mins are hit on the currentTime