Whenever the player teleports. It only teleports the HumanoidRootPart and not everything

Whenever the player teleports to a certain position, it only teleports their humanoidrootpart. I want this to teleport the entire player model and not just the rootpart.

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local m = player:GetMouse()
	if key == "q" then
		print("q pressed")
		local ray = Ray.new(char.PrimaryPart.Position, char.Humanoid.MoveDirection * 20)
		local Part, Pos = workspace:FindPartOnRayWithIgnoreList(ray, {player.Character})
		player.Character.HumanoidRootPart.Position = Pos

idk if this will help, but instead try replacing the CFrame instead of the actual position
so like:

player.Character.HumanoidRootPart.CFrame = CFrame.new(Pos)

This helped. Thank you so much!

What if I want to convert (char.PrimaryPart.CFrame.LookVector * 0.715) into Vector3?
EDIT: Nevermind. LookVector is already a vector on it’s own

ok Let’s say I want to change the Position but not the Rotation. How do I do that?

I think iti s something like:

part.CFrame = CFrame.new(Vector3Position) * part.Orientation
1 Like

So I tried doing what you put. And it returned an error

Unable to assign property CFrame. CoordinateFrame expected, got Vector3
Character:PivotTo(CFrame.new(Position) * Character:GetPivot().Rotation)

it ok, I got it working. I just had to use

part.CFrame = CFrame.new(Vector3Position) * CFrame.fromOrientation(math.rad(part.Orientation.X),math.rad(part.Orientation.Y),math.rad(part.Orientation.Z))