Issue
So, I am trying to make a few purchases happen one after one, but then I realised it would not work. I looked it up online and couldn't find anything, so I am going to ask it here. How do I detect if the 'Cancel' button is pressed when purchasing a Developer Product?
What I tried
I have attempted to use PromptPurchaseFinished but it does not fire.
My code
game:GetService("MarketplaceService").PromptPurchaseFinished:connect(function(player, assetId, isPurchased)
if isPurchased then
print(player.Name .. " bought an item with AssetID: " .. assetId)
else
print(player.Name .. " didn't buy an item with AssetID: " .. assetId)
end
end)
I have attempted this in a normal script and local script, same results, nothing. No errors. Code is also from the wiki, but I used the exact same thing

2 comments
This code should run, make sure you have not disable the script and that is is running by adding in a print to the top of the code.
It is running, and the print is visible.