I Want to prompt a product purchase when someone click's on part.

local button = script.Parent

local devid = 492714573

  

button.ClickDetector.MouseClick:Connect(function()

game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer,devid)

end)

what is wrong with this code, it doesn't seem to be working

2 comments

0

Can you please post the whole code into a PasteBin

0

you can just use button.MouseButton1Click if it's a Gui.