This is what I got
player = game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X print(player)
When I run this I get an error saying something about the Character. Why does this happen?
You should check if the player's character exists first, if you are running the script immediately when the game starts then there is a good chance it will be executed before the player spawns
local Character = game:GetService("Players").LocalPlayer.Character or game:GetService("Players").LocalPlayer.CharacterAdded:Wait() local Position = Character.HumanoidRootPart.Position.X print(Position)