Hey all. There's not much to say accept that this is in a TextButton. Here is the current script and it does not work.
local plr = script.Parent.Parent.Parent
local function buyItem(button)
button.MouseButton1Click:connect(function()
local marketId = button["market"].Value
link:PromptProductPurchase(plr,20282186)
link.ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then
game.Lighting.GravityCoil:Clone().Parent = plr.Backpack
end
end
end)
end
Thanks for the help everyone.
Also, the TextButton is in a ScreenGui named "Shop" > Frame > TextButton > Script.
