Im very new to lua code and I want to start from the basis of it. Im trying to understand the code of other's people by code analysis, yet I still dont understand it.
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local coins = Instance.new("NumberValue")
coins.Name = "Coins"
coins.Parent = leaderstats
end)
Can you please explain to me how this works, because I simply dont understand the majority of it