You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I want the NPCs head look at a part via the use of itsNeck
Motor6D -
What is the issue?
-
What solutions have you tried so far?
Tried the solutions from dev forum and youtube but doesn’t work
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local partToLookAt:BasePart = focus:IsA("Player") and focus.Character.PrimaryPart or focus:IsA("Folder") and focus:FindFirstChild("Handle") or focus:IsA("Model") and focus.PrimaryPart or focus
local neckCFrame = CFrame.new(Vector3.new(0,1,0))*CFrame.fromOrientation(
math.rad(-90),
math.rad(-180),
0
)
if source==HRP or source==Head then
local unit = (HRP.CFrame.Position-partToLookAt.Position).Unit
Neck.C0 = neckCFrame * CFrame.new(Vector3.zero,unit)
--NPC:PivotTo(CFrame.lookAt(source.Position,Vector3.new(partToLookAt.Position.X,source.Position.Y,partToLookAt.Position.Z)))
end