I was able to replicate this issue, and I suspect that it’s happening due to the network ownership of the player’s character changing to the server when they’re anchored
I tried stopping the AnimationTracks on the server-side (I also tried stopping them both on the client-side and the server-side), but the run animation continued to play
The only solution I found is to prevent the character from moving by setting their Humanoid’s WalkSpeed and JumpHeight to 0, instead of anchoring them
Oddly enough, it doesn’t work if you do so in a LocalScript, as the run animation would also continue to play (I don’t know why this is happening, though)
Using a server script fixed the issue for me
This is the exact script I used to test:
-- server script in serverscriptservice
local Players = game:GetService("Players")
local function onPlayerAdded(player: Player)
player.CharacterAppearanceLoaded:Wait()
task.wait(4) -- to give me time to start walking
player.Character.Humanoid.WalkSpeed = 0
player.Character.Humanoid.JumpHeight = 0
local animator = player.Character.Humanoid.Animator:: Animator
for _, track in animator:GetPlayingAnimationTracks() do
track:Stop()
end
print("tracks should be stopped now")
end
Players.PlayerAdded:Connect(onPlayerAdded)