Freezing player animations and NPC jumping? Two for one special here

FREEZING PLAYER ANIMATIONS

I mean
How can I do it?
More so like… instead of “freezing”, temporarily stopping? Because “freezing” could be mistaken for pausing, anchoring, or, you know, all that stuff, when what I ACTUALLY want is…
I mean, the problem is when you’re holding WAS or D, and I anchor your humanoid root part, you’re still, like… the walk animation still plays…? And I want the player to return to a neutral position, just kinda sitting there. Like their idle animation. I don’t want the walking to resume when I unanchor them either, I just want it to be normal and only play when they’re walking again (As I said, like normal).

NPC JUMPING WHEN I UNANCHOR IT

So, I’m doing basically the same thing for the NPC? I make it walk towards you and anchor it in place when it reaches it’s destination. And everything works fine, it’s nothing game breaking, just a little weird when I unanchor the NPC’s humanoid root part and they just kinda… jump? For some reason?

Here’s the code that handles both, answer one problem, or both, either helps. Thanks.

local npc = script.Parent.Parent
		plr.Character:SetPrimaryPartCFrame(CFrame.lookAt(plr.Character.HumanoidRootPart.Position, npc.HumanoidRootPart.Position - Vector3.new(0, plr.Character.HumanoidRootPart.Position.Y - npc.HumanoidRootPart.Position.Y,0))) --I know this line is confusing and long but it's just making the player look at the npc
		plr.Character:SetPrimaryPartCFrame(plr.Character.PrimaryPart.CFrame * CFrame.new(0,1.5,0)) --doing the previous method sticks em in the floor, this makes em move up enough to be on the ground
		local plrAnimations = plr.Character.Humanoid.Animator:GetPlayingAnimationTracks()
		for i, plrAnimation in pairs(plrAnimations) do --my attempt at force stopping player animations, doesn't seem to work... it used to but it would permanently stop so I don't know what happened
			plrAnimation:Stop()
		end
		plr.Character.Humanoid.AutoRotate = false
		plr.Character.HumanoidRootPart.Anchored = true
		
		npc.Move.Disabled = true --This is a wander script I have inside the NPC, disabled as I don't want it to move randomly)
		npc.Humanoid:MoveTo((plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-5)).p)
		npc.Humanoid.MoveToFinished:Wait()
		wait() --this all makes the NPC move to the player, then wait until they're in position before anchoring them
		npc.HumanoidRootPart.Anchored = true

To freeze a player, set their WalkSpeed = 0 and either disable the humanoid jump state (from a local script), or set JumpPower to zero and make sure UseJumpPower = true for the humanoid from a server script. That will freeze them, but they’ll still play idle animation.

As far as the jumping of the NPC, I think it is something MoveTo is doing. I have noticed that my NPCs sometimes jump when they get up from a seat. I suspect the MoveTo code is falsely detecting an obstacle of some sort and jumping to avoid it.

You can also freeze a player by looping through all the parts in the character and setting them to anchored!

well again misconception that i tried to explain (unless im missing something)
anchoring all the parts will freeze them as i said in the title, but in the actually thing i explained what i meant by freeze was more stop them in place, but still have the idle animation playing, or in a neutral stance

anchoring all the parts will freeze them on that exact keyframe, which i understand is what you could think i meant by “freeze”

yeah, my solution was simply to make their jumppower 0 for the npcs

they wont ever need to jump so its probably better this way anyways

however, ill try the player walkspeed and set jump power to zero
if it works then youll be pleased to find a green check mark on your comment

For this, try anchoring just the humanoid root part.

if you read the thing youd know thats what i did