Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to PromptProductPurchase with ClickDetector?

Asked by 5 years ago
Edited by User#24403 5 years ago

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

```lua 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

0
Can you please post the whole code into a PasteBin TiownBuilderV4 0 — 5y
0
you can just use button.MouseButton1Click if it's a Gui. tree_tree00 48 — 5y

Answer this question