Gamepass Errors

Hiya! :wave:

I am having a problem at the moment with a gamepass I’ve created. I uploaded a gamepass a couple of days ago to my game but when I try to test buy it in my game I keep getting this. image

This is my current code for buying the pass:


local ITEM_ID = 25191934 -- Gamepass ID here

Proximity.TriggerEnded:Connect(function(player)

	game:GetService("MarketplaceService"):PromptPurchase(player,ITEM_ID)

end)
2 Likes

Bc you already own it, but if u didn’t own it it wouldnt throw that error. Just test it in a alt

1 Like

“gamepass is not for sale”

Make it for sale by going to its settings on roblox and go to your place and passes and click the pass then configure it and make sure item for sale is on

MarketplaceService:PromptPurchase() is used for assets only,

Use MarketplaceService:PromptGamePassPurchase() instead

local ITEM_ID = 25191934 -- Gamepass ID here

Proximity.TriggerEnded:Connect(function(player)

	game:GetService("MarketplaceService"):PromptGamePassPurchase(player,ITEM_ID)

end)
2 Likes