Is there a way to detect when a player closes out of a prompt purchase?

Hey! So I made a custom mouse icon for my game, and the only problem is that if they go to buy a product in the game, the ROBLOX prompt UI overrides the icon, making it difficult to see where your mouse is. I figured a bypass to this would be, when the player clicks on a button to buy a product, to disable the custom icon and re-enable the regular one. Here’s the other part to it that I can’t figure out exactly, I hope there’s some method for this. But is there a way to determine when a prompt for a DeveloperProduct has been closed? Not sure if I saw one listed in the MarketplaceService events list. Not completed, but if if they close it or purchase it. That way, I can send a remote event off to the client to re-enable the mouse icon.

Any help here appreciated, thanks!

1 Like

I just recently answered this in another post and the solution was to use PromptPurchaseFinished.

That should help you.

3 Likes

Yes! Use MarketplaceService.PromptPurchaseFinished

Here’s a wiki article:

Edit: wrote this on mobile and haven’t tested it (I haven’t used this in a while)

Like so:

local marketPlace = game:GetService("MarketplaceService")

marketPlace.PromptPurchaseFinished:Connect(function()
--code 
end)
6 Likes

Oh boy! Thanks guys! Glad there’s a method that’ll work for this. :smiley: