Its working Thanks for the Replys!
1 Like
You shouldn’t have a wait statement that’s an hour long. Instead when a player buys the item you should keep track of the time they last purchased this Dev Product. This can be obtained by using os.time()
. Keep this number saved in a Datastore in case the player leaves, and assume that if no value is present it’s equal to 0.
Now whenever you want to reward your player double experience, check the current time using os.time()
and subtract that with the value saved in their player data, if this value is below 3600 then this player has bought the developer product within the last hour.
Its working Thanks for the Replys!