CFrame Arm and head movement

I’m trying to make a AI where the arms and head face the player when its shooting at them. I have narrowed down how to do it to CFrames, but I don’t know how to use them. I have tried watching some tutorials on YouTube but they don’t help. If it can all be procedural that will be MUCH better.

If you need more info, feel free to ask!

You can achieve this by using CFrames and changing the Motor6D’s C0 or C1.
I’ve done this when I tried to make a slope tilting system.

How do I use CFrame? The documentation doesn’t really help

A CFrame consists of 4 vectors (PositionVector, RightVector, UpVector, LookVector); 2 of them being:

CFrame.new(PositionVector3,LookAtVector3)

You could use a BodyGyro and put them on the AIs HumanoidRootPart. That way it would just turn the AI’s character to face a direction instead of just manually cframing every limb.

To CFrame it you would just use

BodyGyro.CFrame = CFrame.new(humanoidrootpart.Position,lookAt.Position)

where humanoidrootpart is the NPCs HumanoidRootPart (or it could be the torso if it for some reason doesn’t have one?) and lookAt would be the Players Humanoid rootpart

After the npc is done doing the aiming, you could destroy it (or keep it if you want them to always face a direction)

If you want more info on BodyGyros you can use the link here

When I try this on RightUpperArm nothing happens. How can I use this to move his arm?

If this is about bodygyros, you don’t need multiple of them on each limb, just placing one in HumanoidRootPart should do.
You may also need to check RightUpperArms properties to see if it’s anchored - I don’t believe the gyro will move it if you have its anchored property set to true. This goes for any parts that are anchored in the npc