Animation stutters when played on the player

So I made a walking animation, and it looks just fine in the Animation editor


But it is very stuttery in game.

What part of the player’s Animate script is causing this? I tried changing some stuff in the script, nothing seemed to work.

Are you replacing only the walk, or the walk and run animations?

1 Like

On both of them.

If you use the same animation id number for both the walk and run it will cause problems.
Try to publish a separate copy of the animation for the run, so that run and walk have two different id numbers

1 Like

Didn’t help. The animation is still stuttering.

Not sure then what the issue could be. When I was using the same id for multiple animations, mine did the stuttering.
Maybe check to make sure the animation is the same as the ones you are replacing, and by the same, I mean, make sure the looping is the same (cant remember if roblox default ones loop or not)
Also make sure the animation priority is the same. (although unless they changed something, I think the animation player forces them all to play as ‘core’)

Wish I could help more. Maybe you changed something to the animation script that messed it up, have you tried your edited animation script the just the default animations?

1 Like

Defaults did work on that script, and I haven’t made any changes besides trying to resolve the issue. I suggest that it maybe forces all the keyframes to be Cubic InOut, becuase it looks like it does.
I will try tinkering around with the script. Thanks.

Turns out the issue is not related to the Animate script. EVERY animation played on the player will be stuttering. I am currently trying to find out why.

Turns out, EVERY SINGLULAR ANIMATION played on a rig is going to stutter. I have no workarounds for this whatsoever, because handling animations from the server is going to be a terrible idea.

So is it the rig? Have you tried a different rig?

1 Like

How would I insert a different R6 rig? I’ve never worked with this before.

Sorry I didn’t realize it was a standard R6 rig, I thought you had something custom made.

How did you get the rig you are making the animation on?
You might need to click ‘play’ in studio, then select your R6 character, and copy
then press ‘stop’
and press paste into the workspace, to get a clone of your actual R6 character into the workspace so you can load up the animation editor with your actual R6 rig.

There might be a difference between the one you are editing currently and the one that is being loaded in when you play

1 Like

I copied my rig and my Animate script, however the result is still the same. The animation is jittering.
What is interesting though is that if I load my animation on the Animation Editor for my player rig, the animation is playing as intended.

This seems to be a Roblox bug, and I am afraid there is nothing I can do other than either report it (and get no response) or spend a week making a custom R6 rig.

One thing I will try to do is maybe put a keyframe in every single frame of the animation, maybe that will prevent it from jittering.

edit: Ok it is impossible to insert a keyframe in every empty frame because it will mess up the animation. I have no clue what to do.

Managed to place keyframes in every empty frame without messing the animation up… Somehow. I am pretty happy with the result but I wish there would be a better solution.

1 Like

It looks like there are multiple walk animations playing, so when one swings the legs forward, another might be halfway behind the them, making it look all jittery because they aren’t all moving in the same direction, so you end up with a combination of the two. The reason that inserting a ton of keyframes is working is because then there is less “interpolation”, but it might take up more memory and more processing power.

I went through the script and the animation is only being played once.
Plus it behaves like this on every rig.

Maybe there are multiple copies of the animation script? Maybe the other animation isn’t another copy of the animation you made, but a different animation that is being played when it shouldn’t? What if you change the priority of the animation to be higher than it is right now?

MyWalkAnimation.Priority = Enum.AnimationPriority.Action4

You could also try printing all the animations that are active:

for _, Anim:AnimationTrack in Humanoid.Animator:GetPlayingAnimationTracks() do
    print(Anim.Animation.Name, Anim.Animation.AnimationId)
end

Animations behave like this in every rig, even if it is being played only once.
You can easily replicate this by doing this simple script

local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local anim = script:WaitForChild("Animation")

local track = animator:LoadAnimation(anim)
track:Play()

Using the script on a blank rig without any other code or animations (along with making the animation loop) yielded no jitteriness:

However, on a character rig that did have it’s own animations, it looked pretty jittery:

Of course, I can’t say with certainty that this is what is happening because I don’t have your place file, but it seems like the most logical to me.

Might be a problem with my animations having In and Out keyframes, maybe Roblox does not like them or something.