Basically, im making a system where a dictionary will change its stock every hour, so at 12:00, 1:00, etc. I made this script but I just started learning about os.date so I’m not sure if this is the best way to do this, here it is:
local function resetRosterEveryHour()
while task.wait(1) do
if tonumber(os.date("%M")) == 59 and tonumber(os.date("%S")) == 59 then
restockRoster()
end
end
end
coroutine.wrap(resetRosterEveryHour)()
Any help is appreciated, thanks!