I'm making a script where it counts down from 24 hours. How do I fix this script to count down properly?
local function CountDown() if script.Parent.Visible == true then local RawTime = workspace.ShopKeeper.Timer.Value local Hours = math.floor(RawTime/3600) RawTime = RawTime - (Hours * 3600) local Minutes = math.floor(RawTime/60) local Seconds = RawTime - (Minutes * 60) if string.len(tostring(Minutes)) == 1 then Minutes = "0"..Minutes end if string.len(tostring(Seconds)) == 1 then Seconds = "0"..Seconds end local TimeString = "Inventory refreshes in: ".. Hours..":"..Minutes..":"..Seconds script.Parent.Time.Remaining.Text = TimeString end end CountDown() workspace.ShopKeeper.Timer.Changed:connect(CountDown)