How to animate welded parts?

Hello everyone,
I am currently working on a subway train. It’s my first advanced train, and I am proud of it. But it’s not enough. I want more realism. So here is my problem:

I want to have my doors be welded to my train, but still play an animation flawlessly.
Each time I unweld the doors, the animation plays but the doors fall out of the train.
Whenever I put the qPerfectionWeld script within my doors, or I put my doors inside the train body, they don’t move at all, although the animation is supposedly playing.

I have tried:
-Putting the doors outside the body. = The animation plays, but the doors fall out.
-Prismatic Constraints = Very glitchy, physics reliant, and cause wobbly doors.
-CanCollide = false ; Nothing happened, doors are still frozen.

I am aware that the doors have to be CFramed by the script to stay relative to each other and the train, but I can’t find any workarounds and solutions, and every person I asked couldn’t help me to achieve what I wish.

This is what I want to achieve:
doorsopening
train doors closing in the game ,Stepford County Railway" by @SCRTeamOfficial
I am particularly interested into how advanced developers do this stuff, especially the devs at SCR.

Thank you for your time,
-MLG

2 Likes

You could use a weld constraint. Then un-enabled it change the CFrame and turn it back on.

You can maybe try using Motor6D, I’m not 100% sure it works but I notice it is used for animating weapon parts etc.

If I were to do this, I would just get parts to add joints onto, then make them transparent and no-collide, and then weld the door to the part that corresponds to it. After that, you can animate it and have correct collision.

Hello, thank you for your answer. The part which is being animated on Roblox, keeps it’s hitbox with it when animated. By that I mean, that when the doors open, my doors won’t keep the Collideable part at their normal positions, the properties of the doors are all animated in real time. Now to your suggestion, it’s the same as animating the normal doors. If you meant that I should weld the doors to noncollideable parts, which is what I understood, the doors themselves would still be collideable.

Hello everyone, I have found the solution.
After you are done with rigging your doors and animating them, you only need to use a weld constraint to weld the RootPart of your doors to your train. A part of your choice. You also need to make sure that your doors are not in the same group of the body of your train, where your welding script normally is. Place them outside of the body, just like your bogies.

4 Likes

You can tween the CFrame of the weld.