Train - Door Animation

Hey Devforum,
I’ve got a train with door animations made (with the ROBLOX animator) and I’m trying to figure out how to make train door animation play in-game. This issue is, the train needs to stay welded while it animates.(Or else it’ll fall apart) Also, I’d like to not use a new form of animation (Tween or Lerp Etc) as it’ll take too long…
Thanks,
Sasial
PS: I’ve looked through everywhere and have been unable to find out how to do this.

2 Likes

Assuming that the train doesn’t have a humanoid, you will need an AnimationController in order to control the animation. A HumanoidRootPart as the model’s PrimaryPart is also needed. If you have correctly rigged your train with Motor6Ds and Welds, parts would not fall out during the animation.

I am currently working on animations for an in game crate which grants power ups during gameplay. You could try doing the same thing with your own animation. What I have done is inserted a Script, AnimationController, and an Animation object inside the model (I named mine CrateLandingTest1, this is optional).

image

Don’t forget to add your animation ID into the animation object.
image

The script will tell the AnimationController to load the animation object, which returns an AnimationTrack. This can be used to play the animation.

local controller = script.Parent.AnimationController
local anim = script.Parent.CrateLandingTest1
local track = controller:LoadAnimation(anim)
track:Play()

Resulting in the following (particle effects were added in later):

13 Likes

Thanks! I only rigged the doors, not everything.