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

Developer Product Tool?

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

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