local id = 13073982 local clickDetector = script.Parent.ClickDetector clickDetector.MouseClick:Connect(function(Player) game:GetService("MarketplaceService"):PromptGamePassPurchase(Player, id) end)
When you are putting the script in, make sure that it's located inside of the click part alongside the click detector like this having the click detector and Script inside of the ClickPart. I tested the script on mine and it works fine.
ClickPart -- located as script.Parent in the script
Clickdetector
Script