Can I calculate somehow how long a player has been offline as in how long they have not played the game for? Like if they take a 1 hour break or play the next day (48 hours) etc? I'm assuming I can use datastores but I don't know how I'd save the time to compare?

5 comments

3

You could save the time that tick() returns and then subtract the new tick() when they join to see how long since they joined.

0

That makes no sense

1

Yes. It does. You can also use data stores @OP in conjunction with Phlegethon5778's idea but I recommend you use os.time() instead

0

Thank you for the help guys, I know how I'll do this now

0

np