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 10 years ago

When I click on this, it won't prompt a Purchase, anyone know why?

local plr = script.Parent.Parent.Parent.Parent
local link = game:GetService("MarketplaceService")
deb = 0


script.Parent.MouseButton1Click:connect(function()
local marketId = 203068984
link:PromptProductPurchase(plr,marketId,2)
link.ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then
if deb == 0 then
deb = 1
local card = game.ServerStorage.ApplicationStorage.InterviewCard:clone()
card.Parent = plr.Backpack
wait(1)
deb = 0
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
end)
0
What line is the error on and what is the error message? CardboardRocks 215 — 10y
0
Sorry, edited. ScriptingHelpersALT 20 — 10y

Answer this question