Can someone explain how to make a login reward?

So my idea right now is to store the date and time using tick() inside a player data store. And then the next time he joins the game, if the time has been greater than x time, I award benefit, and set the new time. And repeat?

Is that the way people do it? Or is there a better way?

2 Likes

People use os.time(), save it in a DataStore, and then when the Player Joins, Subtract it with the current time to check if it has been exactly a day, the amount of seconds in a Day is 86400 or 60*60*24.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.