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?
The widely adopted and best way to have a countdown continue while a player is offline is to store when the player logged off, and then when they log on, calculate what they should get by comparing when they logged off to now. In your case you would check how many 4 hours have passed and the current state of the 4 hour countdown.