Detect if confirm purchase dialog is open?


#1

So I’m trying to route my UI tabs to buttons on a gamepad control but like over half of them are being used by something else. I want B to close my shop and it’s already routed to the cancel part of the confirm purchase dialog. This means that if that dialog is open and a player hits B, my shop closes too.

I want the shop to stay open. Can I detect if the confirm purchase dialog is visible so I can make sure my shop doesn’t close?


Know when client cancelled :PromptProductPurchase / Way to hide or cancel the gui
#2

You can’t check if it’s currently open, but you are able to see when it’s closed with this and this

You can listen for them when you prompt the purchase


#3

Wow… That’s going to make this a real chore to work with. In fact, those are basically useless for this situation.

Any black magic I could use with those to detect if it’s open?


#4

I can totally agree with this, might want to give it a shot!


#5

How would I use that to detect if it’s open?


#6

It’s not really a chore… just make a variable true when you prompt the purchase, and then when one of those events fire, make it false.


#7

Exactly!


#8

Alright thanks. It is kind of a chore w/ my setup though.


#9

Is there no way to detect when a developer product purchase is finished? It doesn’t seem to fire when I finish those. I can’t find anything on the wiki about an event for that either.

Edit: It seems it’s supposed to work so this must be a bug? Apparently this used to be a thing but isn’t anymore: https://developer.roblox.com/api-reference/event/MarketplaceService/PromptProductPurchaseFinished


#10

https://developer.roblox.com/api-reference/event/MarketplaceService/PromptPurchaseFinished should work for products. There used to be an event specifically for developer products, but it is deprecated.


#11

Okay so that doesn’t work with dev products. Weird.

So basically this now half works. Lovely. I guess I’ll make a feature request for what I needed in the first place.


#12

Are you not able to work with ProcessReceipt and have a remote tell the client of the result?


#13

I could but at this point I’ve rage quit on trying this lol.