-
What do you want to achieve?
i wanted to make rolling system where the featured item is randomized at midnight. -
What is the issue?
i am pretty new at roblox, so i didn’t really know how. also, when i tried using os.time() it only waits 24 hours and it didn’t detect midnight. -
What solutions have you tried so far?
i have tried looking for solutions in the internet, but, most of them are for daily rewards, which is not what i am looking for.
You’ll need a global time when the item resets, because times are different across the world
i know, but i didnt know how to set the global time
Workspace:GetServerTimeNow()
how do i use it in a function, and how do i detect it when reaches midnight
Try the modulus operator on it, like workspace:GetServerTimeNow() % 3600
can you give an example script?