Why does player teleports only on the client side when i use player.Character.HumanoidRootPart.Position

I noticed that player.Character.HumanoidRootPart.Position in the server script teleports the player only on the client and these changes are not reflected on the server (or the player freezes in the air). For myself, I found player.Character:MoveTo() as a solution to this problem. I would like to understand why the first movement option only moves the player on the client side?

The reason why it doesn’t work is because your only moving the humanoidrootpart, not the player. i tried it and it wasn’t client sided, though. two solutions to fix this problem are

character.PrimaryPart.CFrame = part.CFrame
-- And

Just an add onto what @7fis said, of course sometimes you may not wish to change the HRP’s orientation with the part’s orientation too. So you can do this:

local x, y, z = part.CFrame:GetComponents()
character.PrimaryPart.CFrame = CFrame.new(x,y,z)

Sometimes changing the orientation with the CFrame can the character go weird, e.g. flinging.