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

How do i prompt a dev product?

Asked by
KelcriC -1
6 years ago
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.

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 Vulkarin 581 — 6y

1 answer

Log in to vote
-5
Answered by 6 years ago

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)
0
no such thing as MouseButton1Down green271 635 — 6y
0
Yes there is. Check the wiki. Jexpler 63 — 6y
0
@eizaray1234 He is working with GUIs not Parts Leamir 3138 — 6y
Ad

Answer this question