How to make sliding door open while entire model is moving?

Hello there!
I’m recently making a game, and I made a helicopter.
So, I want to make them functional and I tried to make the door open, but it goes weirdly.

What do I make the slidable door open accurate?
Thanks in advance!

1 Like

How do you open and close it? Is the door attached to the helicopter with a weld? If you use a weld or a motor6d, you can tween the C0.

Hello. May you explain more in depth what you are trying to achieve? Maybe attach a gif/clip of how the door is right now, and your script so we can take a look and help you more specifically with your problem.

You cannot use tweens on moving objects, you would have to use an animation

No, an animation isn’t needed. Tweens can be used in this situation. Directly tweening the position of the doors wouldn’t work, of course. But tweening the C0 isn’t the same. Tweening the C0 of a weld changes the offset of one part relative to the other part. So the door would be offsetted correctly from whatever part it’s connected to. The roblox engine calculates the new position every frame based on the given offset. This means position change of the part doesn’t affect the relative offset.

The way animations work is actually that they change an offset property in the Motor6Ds that are used in the animation. This property is called Transform. It’s a CFrame, just like C0 and C1 and it’s applied on top of C0.

Hi,
if you tried motor6d and weld but it didn’t work well, just try using prismatic constraint i use it for the spoiler motion in my cars . Here is a link PrismaticConstraint | Documentation - Roblox Creator Hub.