I want to make a daily login reward that players only get once a day.
But everywhere I look it shows something called "os.time" or "os.date" but they are apparently locked by roblox? Where do I get the current time and/or date for my datastore?
I want to make a daily login reward that players only get once a day.
But everywhere I look it shows something called "os.time" or "os.date" but they are apparently locked by roblox? Where do I get the current time and/or date for my datastore?
We currently do not have access to os.date so we need to use os.time()/tick() which is epoch time. os.time returns the number of seconds since the epoch (1 January 1970, 00:00:00)
To work this out you would need to calculate how many seconds in year, month day ect.
Here are some links to help:-
how-do-you-get-the-date-and-time-from-unix-epoch-time)
Also I have made a module there are better mathematical approaches to this but I chose a logical approach.
There are also other questions on the SH forum which may help.
Hope this helps
This discussion is preserved as it was. New answers, comments, and votes are closed.