In my game, I am adding a group rewards system, that gives you 200 cash every 4 hours, but if the player leaves the game the 4 hour countdown stops and when they join again allows them to get the reward. If I use datastores it saves the value when the player leaves, when they join again it goes to the value saved instead of to have been counting.
Is there a way to keep counting if the player is offline or not playing the game?

1 comment
just use os.time save there log off time then when they come back the new os.time will be the present and the other time will be the pass and when they get the award reset the datastore to the time that they collected it at