local MarketplaceService = game:GetService('MarketplaceService')
local devproductid = 53552490
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.productId == devproductid then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 2
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
COMMUNITY QUESTION
Is there a reason that this doesn't add add the cash to the leader board?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Try UserId instead of userId
You're missing an end. By the way, use a code block (that little lua button on the editor https://forum.scriptinghelpers.org/topic/82/) when you're creating your questions.