Time event ask how

Is there a way to make an event that run maybe every 3 hours or every a day, but started on specific time, so let’s say the event always start at 1 pm no matter if the server start at 10 am or whatever time it is.

2 Likes

This isn’t quite what you want, but might be a useful starting point

That answer also might have some issues, haven’t looked at it in a bit.

@VURZYM also made a daily chest system you can dissect. Haven’t looked at it myself yet: How can I create a daily chest system? - #22 by VURZYM

1 Like

Actually, for a not-per-player “run at these specific times” kind of event you don’t need all that fanciness.

Just check the result of os.time() once a second or so and check if it’s time to do something yet.

You’ll also need to keep a flag around for “did I run it for this minute yet”, to avoid duplicate triggers.

1 Like

ok then thats easy as hell

while task.wait(10800) do
    -- do something here
end
2 Likes

Also I forgot to say that task.wait() is actually more accurate than wait and faster so use that over wait.

Roblox’s wait is hard to trust. Here, there is someone who thought so!

yeah thats the normal wait. the task library is faster

No. Because i want it to run on specific time, not based on task wait or wait, because if I use this it’s only gonna run when there’s a player inside the server, but what I want is no, whether there’s a person or no, it will continue until specific time. Like 13 UTC etc.