Gamepass Shop Button

I was hoping someone knows how to fix this issue with the gamepass button inside my GUI the gamepass is on SALE but it is saying that it is not. Does anyone know the issue with this, Is the code wrong?

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

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

image

1 Like

You need to use :PromptGamePassPurchase to prompt game pass purchases

3 Likes

So that was the error I didnt even see that thanks for pointing it out to me