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

Developer Product Tool?

Asked by 10 years ago

I want to make it so when a player clicks on a GUI and purchases the Product, it gives them a Tool in Lighting, but the PromptPurchase won't come up.

local buyButton = game.Players.LocalPlayer.PlayerGui.Tool.VIP
local productId = 19858627

buyButton.MouseButton1Click:connect(function()
    game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId)
end)

buyButton.MouseButton1Click:connect(function()

    player = game.Player.LocalPlayer
tool = game.Lighting:findFirstChild("VIP")

function buy()
local a = tool:clone()
a.Parent = player.Backpack
end
end)

1 answer

Log in to vote
0
Answered by 10 years ago

Check out processreceipt on wiki.roblox.com

Ad

Answer this question