I've tried rewriting this simple code several times, but nothing seems to work? I made sure that ClickDetector is in the correct place, so that isn't the issue. Please help D:
local id = 7550879 script.Parent.ClickDetector.MouseClick:connect(function(player) game:GetService("MarketplaceService"):PromptGamepassPurchase(player, id) end)