Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i prompt a dev product?

local button = script.Parent.Purchase
local mpService = game:getService("MarketplaceService")

button.MouseButton1Click:connect(function()
    mpService:PromptProductPurchase(game.Players.LocalPlayer, 335171701)
end)

This script is a localscript inside of a text button that is the child of a screenGUI.

1 comment

0

are you sure the button variable is referencing the correct button? If your comment on the bottom of the question is right then button is referencing the child Purchase of the button the script is a child of

1 answer

✓ Accepted answer

This should work, If it does please accept my answer:)

local button = script.Parent.Purchase
local mpService = game:getService("MarketplaceService")

script.Parent.MouseButton1Down:connect(function()
mpService:PromptProductPurchase(game.Players.LocalPlayer, 335171701)
end)

3 comments

0

no such thing as MouseButton1Down

0

Yes there is. Check the wiki.

0

@eizaray1234 He is working with GUIs not Parts

This discussion is preserved as it was. New answers, comments, and votes are closed.