Test purchasing not working

Alright, so,

Today I taught myself how to use MarketplaceService, and no matter what I do I just get this in-game:

Video

Here’s the code:

local MarketplaceService = game:GetService("MarketplaceService")
local ProductID = 16234450
local LocalPlayer = game.Players.LocalPlayer

script.Parent.MouseButton1Down:Connect(function()
    MarketplaceService:PromptPurchase(LocalPlayer,ProductID)
end)

Things I’ve done:

Enabling third party sales
Putting the gamepass on sale
Checking if the ID was correct
Checking the F9 logs/output

Studio used to let you buy it with no fee, but it doesn’t let me do that now.

You should be using PromptGamePassPurchase not PromptPurchase

local MarketplaceService = game:GetService("MarketplaceService")
local ProductID = 16234450
local LocalPlayer = game.Players.LocalPlayer

script.Parent.MouseButton1Down:Connect(function()
    MarketplaceService:PromptGamePassPurchase(LocalPlayer,ProductID)
end)
1 Like

image
I honestly think this is a roblox issue

If you made the game pass, you already own it

When you make a gamepass you automatically own a copy of it, you can remove it via going to the gamepass page and clicking on the 3 dots nad pressing “Remove from inventory”

A year or two ago you could buy it again with no fee, and it wouldn’t add it to your inventory either

Purchases in studio doesn’t add anything to your inventory

1 Like

I know. It would act as if it did, and stuff like UserOwnsGamePassAsync would work.
But it wouldn’t affect the website/your inventory.

image

First make a test gamepass, remove it from your inventory & prompt that one to check if it works (You should get something like this from the image)

Also after making the purchase, you should use the PromptGamePassPurchased Event to know when the player has purchased it or not (That way you can implement the checks)

If it does, then you can create the real one & keep that one to yourself cause you would own it to the public