Animation flicking when in a script

  1. What do you want to achieve? I want to achieve smooth animations

  2. What solutions have you tried so far? Tried looking around but didn’t seem to find people with my problem

The animation is normal in the animation editor but when I put it into my script it starts flicking the leg for no apparent reason, it might be the script and that why I am asking in here.

anim = script.Parent.Animation
human = script.Parent:WaitForChild("Humanoid")
local animation = human:LoadAnimation(anim)

while true do


This is because your animation priority isn’t high enough.
This means the animations already playing are conflicting with your new animation, causing the flickering.

Set your animations priority to Action4.
More info on the topic:AnimationTrack | Roblox Creator Documentation

Hmm, even after setting it to Action 4 the leg seems to be still flickering

In that case it could be you playing the animation in a while loop resetting it over and over. Try only starting it once.

Okay, so I ran it once and the same thing happened, sorry for a late response!

animation.Looped = false
	animation.Priority = 5

Oh you made a slight mistake.

make animation.Priority = Enum.AnimationPriority.Action4

Then it should work

I didn’t work, maybe it’s a bug because this really wierd. The leg flickers in the middle of the animation :thinking:

dang bro.

Test the animation just by itself. In a completely different script.

I’m not gonna lie, unless you have other anims playing I don’t know how to help you.

1 Like

I’ll try to figure it out myself really wierd! Thanks for the help tho :grinning:

Your welcome.

Just check to see if there are any other animations playing, and see if anything is setting motor6d positions.