How to prevent an npc from falling

Hello developers,

Im currently making an NPC that continuously looks at the player smoothly with the use of AlignOrientation. But as far as i am aware, AlignOrientation doesn’t work when the humanoidrootpart is anchored. Is there a way to make sure that an npc will never fall without anchoring the humanoidrootpart?

PS. the NPC’s are always stood in the same position

1 Like

Why not just unanchor the npc? If the npc is floating just put an invisible part underneath. If there’s still an issue of cframe.

rootPart.CFrame = CFrame.lookAt(rootPart.Position, targetRoot.Position)

Put an attachment into terrain at the position you want the NPC to be at and then put another attachment into the NPCs primary part. Then add an AlignPosition to the primary part and Attachment0 to the attachment in the terrain and Attachment1 to the attachment in the NPC. It should stay in the same spot and be able to rotate

wait no found a better way

Just put an AlignPosition into the NPCs primary part and set the AlignmentMode to OneAttachment. then set the RootRigAttachment into Attachment0.

Then set ForceLimitMode to PerAxis
Then set MaxAxesForce to 0, 10000, 0 (only if the default 10000, 10000, 10000 does not work idk)