As it is said in the tittle, I wanted to put the Y position of all the player in the leaderboard. To do that I have made this script :
local function OnPlayerJoin(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local Height = Instance.new("IntValue")
Height.Name = "Height"
Height.Parent = leaderstats
Height.Value = player.Character.Torso.Position.Y
end
game.Players.PlayerAdded:Connect(OnPlayerJoin)
I want to show the "altitude" of all players in the leaderboard by using the Y position of thier torso.
My problem is that Character is a nil value
The script is in ServerScriptService and it is a normal script

2 comments
You can't change the Y value individually, it's view-only.
That's not what he's doing. He's reading it and assigning that value - 8 to his Height leader-stat.