in this code i was wondering if the variable 'player' in the event function must be that variable or it can be anything so what i mean is if i put in anything other than player as my variable would it still work or no?
--by Neosavvy
game.Players.PlayerAdded:Connect(function(player)
stats = Instance.new("IntValue", player)
stats.Name = "leaderstats"
Lvl = Instance.new("IntValue", stats)
Lvl.Name = "Lvl"
Lvl.Value = 0
Nation = Instance.new("StringValue", stats)
Nation.Name = "Nation"
Nation.Value = "None"
Rank = Instance.new("StringValue", stats)
Rank.Name = "Rank"
Rank.Value = "None"
end)

3 comments
You can rename
playerto anything long as it agrees with lua syntax.Be careful when naming two things with the same variable because one will overwrite the other
You can name it whatever you want. But it is encouraged that you use variable names that make sense based on the situation you're in. In this case you're dealing with a player "player" is appropriate