I get the error "Argument 1 missing or nil." What is wrong?
MarketplaceService.ProcessReceipt = function(purchaseInfo)
local player = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.Playerid)
local Gems = player:WaitForChild("leaderstats").Gems.Value
Gems = Gems + 50
end

1 comment
you forgot to capitalize the 'i': purchaseInfo.PlayerId