I made it to move player to particular position.
It works when player respawn, so HumanoidRootPart should also born in a few second but…
It doesnt wait for it. I have never used WaitForChild in myself. Pls teach me what I didnt know
Based on what you have here, it seems that Player.Character is nil when you try to run :WaitForChild(). Try adding the following line before those other two:
while not player.Character do
task.wait()
end
player.Character:WaitForChild("HumanoidRootPart").CFrame = game.Workspace.yeshere.CFrame
player.Character:WaitForChild("HumanoidRootPart").Anchored = true
It worked well!
But why the code upper not worked?
Player:WaitForChild("Character") doesn’t work because Character is a property of Player (that refers to the player’s character model), not a child. :WaitForChild("Character") attempts to wait for an instance called “Character” to load or appear, but since neither ever happen, the script gets stuck yielding forever.