Glitched animation transitions?

How would I fix this? The idle and the walk animations only apply when you refresh your animations.
I change them by changing the children of the Animate (one inside the character) script to fit my IDs.

1 Like

I don’t know if there is a better way to do this, but personally I add this every time I change the default roblox animations:

humanoid.WalkSpeed = 0
-- script that changes the animations here

		humanoid.WalkSpeed = 13 -- put your desired walkspeed here
1 Like

Hello! What is the script so i can see if i can help?
Also it seems like you need to do


But maybe im wrong

Show us the script that is supposed to run your anims.

Hi, the animation isn’t being played by my script, it is being played by the default roblox Animate script as I noted,
This file is automatically created upon character spawning.

So your issue is once you draw your sword the animation of holding that sword keeps playing when its unequipped is that right?

It stops playing when you refresh the animations by moving, but the problem is if you have an idle animation and you change it with some other animation it will stay the first animation until you refresh it by moving then it plays the second animation. Basically “glitched animation transitions” as the title says.

Yea thats due to the fact that when you change the id of an animation doesn’t mean it will play. Once an animation calls the play() function it will play what that animation track was at the time, and it won’t play again until its called to do so. Changing the id isn’t enough you would have to physically tell the animation to play with the new ID.

1 Like

Do you think I can sneak some code into the default Roblox Animate script to make the animations play once the ID gets changed using an event?

I think you shouldn’t worry about touching the default roblox animate script. Instead create a local script underneath your tool and do:

local player = game.Players.LocalPlayer
local hum = player:WaitForChild("Character").Humanoid
local Tool = script.Parent

local anim1 = --whatever your anim is--
local animtrack = --load anim1 animation onto humanoid--


That could do, but it’s really impractical for the game because there are multiple types of weapons as greatswords, and mediums and all have different idle anims. Plus the equipped weapons are stored in a tool in a string value, so every weapon uses the same tool.

This does work, yeah it moves the character which is a bit of a downside but it’s just a band-aid until we find the real fix, I’m gonna use this for now, thanks!

1 Like

I don’t think having such different values share the same tool is a great idea but to do what you want you can simply make 2 anims in rep storage 1 for idle with sword, and 1 for swinging. Simply when equipping different weapon or when any weapon gets equipped set those anim id values to whatever you want in the script and load those and play the idle anim.

Unless your weapons have different walking anims aswell, this shouldnt be an issue. If you animate something without animating the legs, the default roblox leg walking animation will take over the legs and fill in the gap.

Basically, you could animate just the upper half of the body and the legs will walk by themselves.

Here’s a prototype script. I cant make it exactly for you as I dont know how your hierarchies and such work.


local weapon =  Tool:FindFirstChild("WeaponValue").Value
if weapon == "Greatsword" then
   --play anim for greatsword idle
elseif weapon == "Spear" then
   --play anim for greatsword idle


Did try it. But the custom idle animation is meant to have legs animated to look more fluent, so this won’t do for me, even though it’s a really good and helpful idea.