I have an R15 NPC with a basic animation and sound script (if you want to mess with mine in particular: npc.rbxm) , and I’m using :MoveTo to get the NPC to walk forward to a specific point, and that’s all working fine.
My goal is to achieve the exact same effect, however have the NPC always face a specific part (even as that part and the NPC move). Specifically, have the NPC walk to a point behind it while still facing forward (and sideways as the other part goes through its own animation).
I’m not sure how to go about this at all. I tried setting the humanoid root part’s CFrame every frame to face the part, but this completely messed up the walking effect.
1 Like
Would setting AutoRotate to false for the Humanoid of the NPC work?
1 Like
Awesome! Didn’t realize that was a property. Now that that’s off, how do I make it so the NPC rotates to face the specified part while they are walking?
Best comparison I can think of here is how the Watch CameraType rotates to keep the subject in the center, something like that except the NPC is rotating to keep the part directly in their line of sight even though they’re both moving.
1 Like
Try inserting a BodyGyro into the NPC’s HumanoidRootPart, and setting the BodyGyro’s CFrame to the part that you want it to face. I’m not certain that this will work, but it’s the best solution I can think of.
1 Like
Works nicely and extremely smoothly, thanks!
1 Like