How can I resume NPC animations after freezing them temporarily?

local animations = npc.Humanoid.Animator:GetPlayingAnimationTracks()
        for i, animation in pairs(animations) do

so uh
this is good to like stop the npc from doing that walking animation forever when i anchor their humanoidrootpart
but how do i get them to resume?

or, rather, should i use a different method of getting the animations to stop, instead of getplayinganimationtracks()?

You can use :AdustSpeed(0) to freeze an animation then :AdjustSpeed(1) to resume an animation. Although, if you would like to actually stop the animation but resume it later, then I guess you can save the timeposition on when you stopped the animation and then play the animation and set its time position like this:

local savedTimePos = animationName.TimePosition
-- Put this line of code before you stop the animation
animationName.TimePosition = savedTimePos
-- Put this line of code after you play/resume the animaton