Game pass script not working

I am trying to put a game pass button in my game but every time I try to purchase the product it states “This item is currently not for sale”

I have tried other scripts, But none of them worked.

image

local productId = 8865207
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
	game:GetService("MarketplaceService"):PromptPurchase(player, productId)
end```
1 Like

Did you check the wiki page? It explains pretty much everything.

I didn’t know the first thing about gamepass purchases and this made it step-by-step easy for me.

1 Like

Instead of using :PromptPurchase, try :PromptGamePassPurchase. This should hopefully solve your problem. Best regards,

  • eizaray1234
2 Likes