(PAYING FOR SOLUTION) AnimationController doesn't play properly

I’m making a rocket animation right now. However, I’m experiencing some issues with the AnimationController.

I will give 100 robux to the first person that successfully solves this.

Here’s what the animation is supposed to do:

Here’s what it does:

As you can see, it greatly exaggerates the movement of the rocket.
Here’s my code:

local a = Instance.new("AnimationController")
a.Parent = script.Parent

local b = Instance.new("Animation")
b.AnimationId = "http://www.roblox.com/asset/?id=15304205232"
local c = a:LoadAnimation(b)

wait(3)

c:Play()

If anyone knows why this is happening, please let me know! :+1:
Here’s the rocket download:
rocket.rbxm (105.7 KB)

Thanks for reading! I hope to hear from you! :smile:
(Additionally, this project needs to be done ASAP so if you have any comment, it would be super helpful to me and my development team. Thank you!)

An AnimationController needs to have an Animator object for it to work, create an animator object, parent it to the animationcontroller, and then play the animation on the animator.

local animationController = Instance.new("AnimationController")
animationController.Parent = script.Parent
local animator = Instance.new("Animator")
animator.Parent = animationController

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://15304205232"
local animationTrack = animator:LoadAnimation(animation)

task.wait(3)
animationTrack:Play()

Then this should work like normal.

(ps: please dont name your variables with single letters :sob: and use task.wait)

Unfortunately, this code gives off the same behavior.

Also, I usually don’t program like that, just in a bit of a rush haha
Thanks for the tips tho! Any further ideas on how to fix this?

Any responses are super helpful atm! :smile: :smile:

1 Like

Are those keyframes used in the animation set to Constant? If so, revert their EasingDirection (e.g. In → Out)

1 Like

I think I solved it. The rocket doesn’t zoom off any more when I play the animation
RocketFixed.rbxm (113.1 KB)

2 Likes

Great job! Mind sharing what you did? I’ll mark it as solution. (So anyone else who might be having this problem will be able to know how to fix it)

Additionally, message me your discord tag. I’ll be sure to pay you!
Thanks!!

1 Like

I just changed the model scale property as it glitches out animations

3 Likes

My guess is that the HumanoidRootPart has moved due to physics and the weight of the rocket. Try setting the rocket itself to be massless, or anchor the root part.

1 Like

does the rocket perhaps, not have a core part which is anchored (it might be moving the rocket itself due to the animation) (if this is correct, I dont need the Robux)

Maybe try this?

local a = Instance.new("AnimationController")
a.Parent = script.Parent

local b = Instance.new("Animation")
b.AnimationId = "http://www.roblox.com/asset/?id=15304205232"
local c = a:LoadAnimation(b)

wait(3)

c:Play()

wait(c.AnimLength)

c:Stop()

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.