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

Why won't this work?

Asked by
Retroc 35
10 years ago

Hey all. I need help with selling a developer product through a GUI, that also awards a gravity coil. (that lasts one life, but that doesn't matter). I think I have the award gravity coil thing down, but the GUI doesn't work and isn't popping up the developer product thing. This is the whole script in TextButton.

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!

1 answer

Log in to vote
0
Answered by 10 years ago

line 5 change market to Market. I think that will work. Also on line 1 change where your button is.

Next time please put a error. To find your error go to your console in your place. Or go into your game and press f9 and click on server console.

Ad

Answer this question