Player not turning

I’m trying to have the player teleport infront of the “MouseTarget” AND have the player look towards the “MouseTarget” but it isn’t working.

		print(MouseTarget.LowerTorso.Orientation -, 180, 0))
		player.Character.HumanoidRootPart.Orientation =, 180, 0)

		player.Character.HumanoidRootPart.Anchored = true
		MouseTarget.HumanoidRootPart.Anchored = true
		MouseTarget.HumanoidRootPart.Position = MouseTarget.HumanoidRootPart.Position
		player.Character:SetPrimaryPartCFrame(MouseTarget:GetPrimaryPartCFrame()*, 0, -4))

have you tried using cframe.angles instead? (make sure to use math.rad)
since orientation, is based off of world positions, and angles is based off cframe.

Try using CFrame.lookAt. This code might work:

local CharHRP = player.Character:FindFirstChild("HumanoidRootPart")
local MTHRP = MouseTarget:FindFirstChild("HumanoidRootPart")

CharHRP.CFrame = CFrame.lookAt(CharHRP.Position,, CharHRP.Position.Y, MTHRP.Position.Z))
1 Like

J_Angry his answer worked combined with teleporting the player before making the player face the right direction

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.