Humanoid Stuttering

I have a enemy in my game, It spawns in and is anchored until its animation ends, but the npc stands there stale for seconds like it has PlatformStand enabled

the model spawns like this at its position being its humanrootpart is anchored and it plays the animation


I would like to point out im using AlignOrientation in the enemies Torso to make it also face the player in combat, it probably leads to a cause but what are fixes?

Any errors in the output?
Are you using Humanoids
And is the NPC controlled by the Server or Client?

Are you using PathfindingService?

Npc is controlled by the client
Yes it uses a ai script i didnt make but i edited it and it is indeed using pathfinding service. the problem is that the alignorientation stuns the character for some reason, like when your roblox character falls over

Dont use AlignOrientation to rotate characters
Instead CFrame the RootPart
Like this

local Target = game.Workspace.Player1
local RootPart = game.Workspace.NPC.HumanoidRootPart

local TargetCFrame = CFrame.lookat(RootPart:GetPivot().Position,  Target:GetPivot().Position)
RootPart:PivotTo( TargetCFrame )

using that the target looks really dead tho, its supposed to subtly turn

Try lerping or Tweening the CFrame but only the Rotation

You shouldn’t Tween the whole CFrame as it will also Tween the position, and interfere with the Pathfinding

it most likely is platformstanding. one NPCs get unanchored for some reason, they freak out and don’t know what to do, so they set their humanoidstate to ragdoll or platformstanding. disable them from having the ragdoll and platformstanding humanoidstate, and when the animation finishes and you unanchor them, set their state to gettingup and reenable the previous states.