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!
Here’s the rocket download: rocket.rbxm (105.7 KB)
Thanks for reading! I hope to hear from you!
(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 and use task.wait)
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.
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)
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()