Mannequin purchase not working

Hey guys, I’m new to developing and recently made a homestore. When I published it, the players were telling me that they couldn’t buy any of the clothes so I went on an alt account to try it for myself and I was clicking the buy button for shirts and pants but the roblox purchase gui wasn’t coming up.

I used a model with the script included so all I had to do was copy the item id into the certain area so i’m pretty confused about what is going on. I was doing some research and trying different scripts but they all have the same outcome of the purchase gui not coming up.

Here is the code that i’m using:Screen Shot 2020-10-14 at 6.41.07 pm

And here is a link to my game incase you want to see for yourself:
https://www.roblox.com/games/5819469219/Squeetles-Homestore?refPageId=a5e123df-8a42-4312-a361-771da0aa382c#!/game-instances

I would really appreciate if someone could please tell me what’s wrong and how to fix it (and if you need any more photos I would be happy to add them). Thank you so much.

2 Likes

I believe this might be the problem.
https://gyazo.com/f32ea7090688e19224349a06c9e13cab

To fix this, click on workspace, and in the properties search up “AllowThirdPartySales” and enable it.

So I just need to allow third party sales?

Porbabaly, in the future, you should open the developer console in game and check if there is any messages present telling you the error.

I allowed it and published the new version but I don’t think its working.
Screen Shot 2020-10-14 at 6.56.21 pm

anyways, thank you so much for your help!

Instead of:

MarketplaceService:PromptPurchase()

Do

MarketplaceService:PromptGamePassPurchase()

This is because it will prompt the gamepass with the specific gamepassID.

I’m pretty sure that’s a shirt ID, not a gamepass ID. So your solution won’t work.

I just tried it and a gui came up but it said that something went wrong and my account has not been charged.

Sorry, lol I didn’t realise that.

This should be because of thirdPartySales. To enable this go to Home - game settings - Security - Allow Third Party Sales. Make sure this is done in game settings. Here is an example to help:

Omg thank you so much!! This actually fixed it!!

1 Like