In studio, this code prompts me to purchase the developer product, but in game it does not. Help!
local plr = script.Parent.Parent.Parent.Parent.Parent
local link = game:GetService("MarketplaceService")
script.Parent.MouseButton1Click:Connect(function()
local marketId = 325595311
link:PromptProductPurchase(plr,marketId)
link.ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then
plr.leaderstats.Ticket.Value = 2
wait(1)
end
end
end)

3 comments
ProcessReceipt is a server side only callback.
Also, why is plr defined as 50 script.Parent's ?
And I can fix that how...?