local player = game.Players.LocalPlayer
script.Parent.MouseButton1Down:connect(function()
game.Players[player.Name].LeaderStats.EXP.Value = game.Players[player.Name].LeaderStats.EXP.Value + 1
end)
I get this error: attempt to index local 'player' (a nil value)
Help? thanks!

2 comments
Also to build off of what eLunate said, leaderstats have to be all lowercase to work.
no, it is a custom made leaderboard, so I made a model named "LeaderStats" in the player to hold values to update the custom leaderboard and used a DataStore to save those values