so i was working on a character selection system and i noitced a weird issue when i teleport the player’s selected character to a location the client and the server have the player’s visiual location in different places
the client has the correct position and visiual but the server has the HumanoidRootPart in the correct location but the rest of the character in the original place the character was standing before it got teleported
here’s a video example (right is server and left is client)
i tested with two clients and both clients had each other’s correct positions while the server got them both wrong still
here’s the code i use to switch the player’s character from the original to the chosen character and also teleport them
local anim = plr.Character.Animate:Clone()
local hp = plr.Character.Health:Clone()
local Animator = Instance.new("Animator")
-- switching the character which will delete the old one
plr.Character = Bodies.Nemo
plr.Character.HumanoidRootPart.Anchored = false
-- parenting the copied scripts to the new rig
hp.Parent = plr.Character
anim.Parent = plr.Character
Animator.Parent = plr.Character.Humanoid
-- Teleporting Character and walking out of the bus
plr.Character.HumanoidRootPart.Position = workspace.pointA.Position + Vector3.new(0,4,0)
wait()
plr.Character.Humanoid:MoveTo(workspace.PointB.Position)