Can't sell passes in-game

Hello everyone. For those who don’t know, I created a game called Experience Anti-Gravity, and I recently released a new shop update for players to be able to buy cool gamepasses and get stuff for their player in the game.

I’m trying to make a button that brings up the GUI and lets you buy the item, but it keeps saying the item is not for sale. The item is under on sale and the code seems to work fine. It just keeps saying that it’s not for sale, even though it is. Is there something I’m doing wrong? The code I use is

local plr = game.Players.LocalPlayer
local marketplace = game:GetService("MarketplaceService")

script.Parent.MouseButton1Click:Connect(function()
	marketplace:PromptProductPurchase(plr, 14915296)
end)

Any help is very appreciated, thank you.

I’m pretty sure the function you’re using can’t be used for game passes. Try using

for game passes.

2 Likes

Should be Prompt Game pass purchase of something not Product purchase

1 Like

thanks so much! you were right. thank you!!

thank you! you were also right.