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)

2 comments

0

What line is the error on and what is the error message?

0

Sorry, edited.