:PromptProductPurchase Not Working

Hello Fellow Developers, I am currently having an issue on my game where if I use the :PromptProductPurchase() it does absolutely nothing. To give more detail, I am using a LocalScript inside a TextButton that is inside a SurfaceGui and when you click the TextButton you are supposed to be prompted with a Developer Product purchase. Here are a few pictures and a video of my issue along with my code. robloxapp-20200702-2003573_Trim.wmv (158.4 KB)

I have tried many solutions, not one has done anything. For example, I put print(“Clicked”) at the end of my script, and nothing shows up in my Output Window (And yes I clicked it before looking in the output window, besides my plugins and stuff)

So if you think you have a solution or have had this problem before, I am looking and trying everyone’s suggestions so please reply. Thank you for reading and have a nice day. :slight_smile:

Edit: Yes I have enabled Studio Access to API Services and also tried it in the game server and it has not worked.

I believe you need to do this in the server.

1 Like

I think you need to put the SurfaceGui in StarterGui, and set the “Adornee” property to the block you want to have the TextButton on.

Also, the “click” in your MouseButton1Click function doesn’t need to be there, because it doesn’t do anything.
image

1 Like

Thanks so much! This works very well now! :smiley: