Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I am stuck on how to use os.time?

Hi there i am in the discord and a few people helped me put i still cant figure how to check if its a new day and make the shop reset at 0:00 UTC i tried using os.date() and formatting it into UTC time but i need some more guidance on how to check if there is a new day.

I want to be as accurate as possible and minimum delay so maybe i can use an external server like googles?

Anyways can someone show me how to do this and achieve it many thanks.

1 comment

1 answer

✓ Accepted answer

Use this.

Here it is:

while true do
	local date = os.date("!*t")
	if date["hour"] == 0 and date["min"] == 00 and date["sec"] == 00 then
		--reset code here
	end
	wait(0.00001)
end

Happy to help, b_mni

This discussion is preserved as it was. New answers, comments, and votes are closed.