I tried to make a gamepass prompt, but when I clicked the button I got an error on line 5.
"MarketplaceService:PromptGamePassPurchase() player should be of type Player, but is of type nil"
This is the code (local script):
local MarketplaceService = game:GetService("MarketplaceService")
local gamepassId = 16463231
script.Parent.MouseButton1Click:Connect(function(player)
MarketplaceService:PromptGamePassPurchase(player, gamepassId)
end)
Can someone please help me? Thanks!
