OG script:
game.ReplicatedStorage.Purchase.OnServerEvent:Connect(function(Player, Price, Item)
local new = game.ServerStorage[Item]:Clone()
new.Parent = game.Players[Player].Backpack
end
Error: 13:21:12.619 - ServerScriptService.Leaderboard & Shop:3: bad argument #2 to '?' (string expected, got Object)
incapaxx answered in the comments, I didn't need to do game.Players[Player]
here's the fixed script
game.ReplicatedStorage.Purchase.OnServerEvent:Connect(function(Player, Price, Item)
local new = game.ServerStorage[Item]:Clone()
new.Parent = Player.Backpack
end

1 comment
change game.Players[Player] to just Player. It's redundant to go backwards and index for the player when you have reference to it already. Also why are you letting the client determine the price? They can send a negative number to give themselves more money.