I'm trying to make it so that the player teleport in a specific area but it doesn't wanna work
local player = game.Players.LocalPlayer player.Humanoid.HumanoidRootPart.Position = Vector3.new(54.86, 0.5, -77.58)
Well, There Is A New And Better Way To Identify The Character:
local Player - game.Players.LocalPlayer -- // This Is You local MainPos = Vector3.new(54.86, 0.5, -77.58) -- // MainPos .. MainPosition local Character = game.Workspace:WaitForChild(Player.Name) -- // New Way To Identify The Character local HumanoidRootPart = Character:WaitForChild('HumanoidRootPart') -- // Identifying The HumanoidRootPart HumanoidRootPart.Position = MainPos -- // Setting The HumanoidRootPart Pos To MainPos
you didn't index character before the humanoid
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() -- Checking if character is added if Charcter:FindFirstChild("Humanoid") then -- Checking If there's a humanoid Character.Humanoid:FindFirstChild("HumanoidRootPart").Position = Vector3.new(54.86, 0.5, -77.58) end