AllowThirdPartySales blocks purchase of my own gamepass?

Hello!

So I am adding gamepasses to my game right now and I think I have configured the code correctly. However, when I go to test in the game with Player1 and Player2 using the test feature in studio and try to purchase the gamepass, Studio says:

image

I am very confused and also slightly concerned. I am 100% sure the code that I have routes to my own passID. However, maybe its possible my game has malware (although i doubt it as I can code and have looked through every script in the game). I have also made all the buttons and stuff myself so idk how that would even be possible.

Is this a common bug or am I missing something big? Thanks

1 Like

Have you tried publishing to roblox as a private game and then testing it? It might be a limitation in roblox studio when testing.

1 Like

The thing with that is I can only test as myself if I do that. I need to test as Player1 or Player2 in order to actually see if the purchase works. Since I made the passes, when I join on my main account I already own all of them so it does not let me purchase them.

Could you just add something besides the if statement that checks if the gamepass is owned to test it? something like:

if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 0000000) or 1 == 1  then
--what the gamepass should do
end

that works, cuz I have all the stuff when I load in.

You need to go to Game Settings under the home tab in studio, click on security then turn on “Allow Third Party Sales”.

If you ever want to prompt gamepasses in the future, you’ll need to do exactly that.

1 Like

What method of MarketplaceService are you using?
Can you provide the ID of any of those gamepasses from the place itself? (not the creator dashboard)

To anybody in the future wondering what the issue was. It was as simple as indexing a list incorrectly. I was placing the game id of the item (the system I use to keep track of dev products) instead of the product id into it. It was a simple indexing error. I apologize for not realizing this sooner. I guess I was too confident in my code and assumed it was a roblox issue :rofl:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.