Does anyone know how i could make sure that the benefits of a developer product are granted if the player happens to die or reset right after buying the product. I would want the player to receive the benefits when they respawn. Right now when i test the product purchase i do receive the benefits, but i found that if my character dies right after buying the product i do not get the benefits upon respawning. Does anyone else have this problem?
Use a datastore to check if the player has bought the item. Create a script that whenever the player respawns (player.CharacterAdded), you run through the datastore with the list of all their items and give the appropriate thing. However, it depends on your dev product. I just realized the example I gave previously was for a gamepass. So for your dev product, it depends on what it is, as I was saying. If it’s something like currency, there shouldn’t be any problems as long as it saves when you die. However, if it is something like an item, let’s say it lasts forever until you leave the game, then I would create a temporary value such as a BooleanValue inside the player. Whenever they die, you check if the boolean value = true. If it is, then you would give the player the item again. However, if it is an item that resets once you die and you just don’t want to make them lose it too quickly, I would make a script that uses tick() to record the time they bought it in and check when they die and if they died within a certain period tick() - TimeBoughtTick < 5 for example, then you can just give the item again.
these are all very general and vague answers, please give us more information on the devproduct and the script you are using if what I told you does not help as well as the errors if there are any.