Stop all GetPlayingAnimationTracks bugs?

Stop GetPlayingAnimationTracks doesn't work (optimized).gif

As you can see here, I disabled the Animate script, replaced the old idle and walking animation id’s, and re-enabled the Animate script. But if you tap the Movement keys (WASD or Arrow Keys) really quick, you can see the animation stammers a bit.

Here’s the code itself; Is it on my side or a bug?
blob.png

(Raw copy) ~ Comments for repro are embedded

 -- Added comments for repro
 repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character

local myChar = game.Players.LocalPlayer.Character
local myplr = game.Players.LocalPlayer

local settings = {
idles = {
	["Animation1"] = nil; -- This is where you can store the standard Idle animation (1)
	["Animation2"] = nil; -- This is where you can store the standard Idle animation (2)
	["Animation3"] = nil -- This is where you can store the standard Idle animation (3)
};
walks = {
	["WalkAnim"] = nil -- This is where you can store the standard Walking animation
};
}

local IDs = {
---STAND-ALONE ID's----
newWalkID = 409920527; -- Replace with whatever walking animation id that works for you (has to be core priority)
newIdleID = 409898169; -- Replace with whatever idle animation id that works for you (has to be core priority)
-----------------------
newIdle1ID = 409898169; -- Can be the same as the standalone, but that's optional (has to be core priority)
newIdle2ID = 409898169; -- dito as above
newIdle3ID = 409898169; -- and again
}

local anims = myChar:WaitForChild("Animate")
anims.Disabled = true -- disables the Animate script, this is to make sure that the new Animation ID's will instantly play, and there won't be an awkward waiting time for them to play 
-- (If you don't do this, you need to make the player stop running, and then continue running again before the Animation kicks in)

anims.idle.Animation1.AnimationId = "rbxassetid://"..IDs.newIdleID -- replaces Idle Animation1 with new pre-defined ID
anims.idle.Animation2.AnimationId = "rbxassetid://"..IDs.newIdleID  -- replaces Idle Animation2 with new pre-defined ID
--anims.idle.Animation3.AnimationId = "rbxassetid://"..IDs.newIdleID  -- replaces Idle Animation3 with new pre-defined ID (Unvoid this if you're using R15)
anims.walk.WalkAnim.AnimationId = "rbxassetid://"..IDs.newWalkID  -- replaces WalkAnim with new pre-defined ID
for _,v in pairs(myChar.Humanoid:GetPlayingAnimationTracks()) do
	v:Stop()
	v:Destroy()
end
anims.Disabled = false -- re-enables the Animate so that the new Animations immediately load
4 Likes