How can I immediately stop a walk animation when the HumanoidRootPart gets anchored?

That’s very interesting. It’s probably offsetting it a little, during the cutscene, maybe adding this can fix it?

ReplicatedStorage.Events.BridgeEnd.OnClientEvent:Connect(function()

local RootPart = game.Players.LocalPlayer.Character.PrimaryPart

	repeat task.wait()
		Camera.CameraType = Enum.CameraType.Custom
	until Camera.CameraType == Enum.CameraType.Custom

RootPart.CFrame = CFrame.new(RootPart.Position)
	game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
end)

It may also be that the HumanoidRootPart is being anchored but not the rest of the character, maybe a for loop through the characters body parts might fix it?

That doesn’t seem to work. I might be doing it wrong.


ReplicatedStorage.Events.BridgeEnd.OnClientEvent:Connect(function()
	repeat task.wait()
		Camera.CameraType = Enum.CameraType.Custom
	until Camera.CameraType == Enum.CameraType.Custom
	Camera.CFrame = CameraCF
	Character.Head.Running.Volume = 0.65
	Character.Humanoid.PlatformStand = false
	Character.Humanoid.WalkSpeed = 16
	Character.HumanoidRootPart.Position = workspace.StopPart.Position
	local RootPart = game.Players.LocalPlayer.Character.PrimaryPart

	repeat task.wait()
		Camera.CameraType = Enum.CameraType.Custom
	until Camera.CameraType == Enum.CameraType.Custom

	RootPart.CFrame = CFrame.new(RootPart.Position)
	game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
end)

The problem might be here, when you set the position of any part in the model, you only change the position of that part, you will have to use CFrame, and not position, I made this mistake before lol.

You can remove my CFrame code, because I think it might mess with your positioning.

It seems to have worked for me!

1 Like

Nice workaround …

A test that did stop everything …

local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()

local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local RunSound=HumanoidRootPart:WaitForChild("Running")

task.wait(8)

local ActiveTracks = Humanoid:GetPlayingAnimationTracks()
for _,v in pairs(ActiveTracks) do
	if(v.Name == "WalkAnim" or v.Name == "RunAnim") then
		v:Stop()
	end
	
end
HumanoidRootPart.Anchored = true
RunSound.Volume = 0
RunSound:Stop()

You would have to reset the sound volume after the anchor.
Problem here is the key still being down …

1 Like

Isn’t Humanoid:GetPlayingAnimationTracks() deprecated?

Maybe … Whatever they use now put that in there.
You could just stop them all … but them are the two you’re looking for.
A bit tricky as you need to stop both.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.