I am writing a function and the process receipt function always happens one time more each time I run it.. What do I do? Can anyone help?
function processReceipt(receiptInfo)
print("receipt")
local purchaseplayer = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not purchaseplayer then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
print("now skip")
SkipStage(purchaseplayer)
end
MarketplaceService.ProcessReceipt = processReceipt

2 comments
I don't think it's because you didn't define anything on the local purchaseplayer part.
No, that is part of line three if you look at it