It won't work and I have absolutely no idea why! It debugs when you click it but other than that
local productId = script.Parent.Name local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function() print ("debug") game:GetService("MarketplaceService"):PromptGamepassPurchase(player, productId) end)