Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Looping an animation?

Asked by 10 years ago

I've got so many animation questions it's ridiculous, but hopefully someone here is partially qualified

So how do I loop an idle animation? If I export it as a looped animation then it won't ever let me change the animation from it to another one(for say, walking). I also want to loop the walking animation to make it less choppy instead of it firing over and over.

How do I just make the animations smooth like default animations? Are the default animations looped? What does priority do? Am I supposed to end looped animations to fire new ones?

01local Humanoid = script.Parent.Humanoid
02 
03local animController = Instance.new('AnimationController')
04animController.Parent = script.Parent
05 
06local Animations = {
07    Walk = {id = 'rbxassetid://166955430'},
08    Idle = {id = 'rbxassetid://166961426'},
09}
10 
11local Animation = Instance.new("Animation")
12function PlayAnim(Anim)
13    Animation.AnimationId = Anim
14    AnimTrack = Humanoid:LoadAnimation(Animation)
15    AnimTrack:Play()
View all 32 lines...

1 answer

Log in to vote
1
Answered by
Usering 135
10 years ago

Manually looping an animation is hard to do and you can do it much easier and efficiently if it is set to looped when it is created.

Are the default animations looped? Yes, default animations are looped, but if you want it to look good, make sure the stop position is the same position and rotation in which they started.

What does priority do? Priority overwrites what needs to be overwritten in order for it to work in a certain circumstance. You can read more about it here

Ad

Answer this question