I created a billboard shop, if that makes sense. Where the player can walk up to it and press the buy button to buy a gamepass.
I replaced the id with 0 just for this example.
local id = 0000000
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
game.MarketplaceService:PromptGamePassPurchase(player, id)
end)
This doesn't work however. There are no errors in output.

1 comment
I'm assuming this is a LocalScript, correct? Where is it located?