How can I make a Humanoid face x direction?

I tried this but didn’t work:


	local root = chosen:WaitForChild("HumanoidRootPart")
	local direction = cityFireFightScene:WaitForChild("Direction").CFrame.LookVector
	root.Parent:FindFirstChildOfClass("Humanoid").AutoRotate = false
	root.CFrame = CFrame.new(root.CFrame.p, root.CFrame.p + direction)
	
		




1 Like

Have you tried this?

root.CFrame = CFrame.lookAt(root.CFrame.Position, cityFireFightScene:WaitForChild("Direction").CFrame.Position)
1 Like

you cant set the cframe of the rootpart you will need to call player.Character:SetPrimaryPartCFrame(CFrame.new(root.CFrame.p, root.CFrame.p + direction))

This did not work

local root = chosen:WaitForChild(HumanoidRootPart)|
local direction = cityFireFightScene:WaitForChild(Direction).CFrame.LookVector|
root.Parent:FindFirstChildOfClass(Humanoid).AutoRotate = false|
chosen:SetPrimaryPartCFrame(CFrame.new(root.CFrame.p, root.CFrame.p + direction))|


movement of the humandrootpart on the server does not work you will need to move to the client if you havent already

I am using a local script already D:
I’m creating the NPC via local script and running this chunk locally.

change your setting cframe to CFrame.new(root.CFrame.p, cityFireFightScene:WaitForChild("Direction").CFrame.p)