Currently what I (and many other devs) do is have a timeout to determine whether or not the purchase prompt was cancelled. This is EXTREMELY messy in my situation:
I’m having a dev product for “+1 life” - players will be prompted to buy it when they die.
This means that the player spawning in after he/she dies will have to be delayed for 30 SECONDS or however long to determine whether or not the player cancelled the prompt! This is bad for players because if they don’t want to buy the product, they will have to wait AN EXTRA 30 SECONDS to respawn!!
Also if the round ends and the player buys the product, then the player is kinda screwed LOL (so thats why we also need a way to hide the :PromptProductPurchase gui)
What many of you are probably going to suggest is have an intermediate gui on my side that asks whether or not the player would like to buy an extra life, and then if player clicked yes, THEN prompt the purchase - I will definitely do this, but in my opinion ROBLOX should UP their game and implement a way through their API to determine whether or not the purchase was cancelled.
You can use MarketplaceService.PromptProductPurchaseFinished(userId,productId,isPurchased) to determine if they hit cancel, HOWEVER, this event should NOT be used for determining if they purchased the product. You can also listen for this event on the client.
You mean cancelling a Prompt? Like user dies and then goes afk, and you want to remove the prompt for extra life after 30 seconds? Not that I know of ¯\(ツ)/¯.
I need this so I can make my game gamepad compatible. For whatever reason the “replacement” PromptPurchaseFinished() does not fire when you get a dev product.
It also seems that PromptProductPurchaseFinished doesn’t work anymore either.