How to tween a part when it is attached to another part that is also tweening

I don’t know if the title is confusing, it’s a little hard to explain. So I made a model which is supposed to be an elevator, and I want to make it so when you step into the elevator, the door closes and the elevator goes up to the target location, and then the elevator door would open again. Letting the player out.

And my problem is that first you step into the elevator, the elevator door closes. But when the elevator starts moving, the door does not move with it.

You can try using Welds and modifying their C0 property.

Would I be able to make the door stick to the elevator and tween to open and close and not stay still?

Yes, you really just need to have the door Unanchored and have it welded to the door. I suggest using a plugin like RigEdit Lite to properly position the weld and then you can use the C0 property of that weld to tween it to open and close.

Could weldconstraints work aswell?

As the other user said, you can use Weld and WeldConstraint.
In your case, perhaps you should use WeldConstraint because you are manipulating the object that should “follow” the other.

You can but it’s best to use Welds as they are more easier to use and it’s unlikely they will ever get deprecated.

I managed to weld it to the elevator, but when the door is unanchored it cannot be tweened to open and close, but it does move with the elevator. But if I make it so the door is anchored, it does tween but does not move with the elevator.

In this case, WeldConstraint will solve the problem.

What should I do after the Part0 is set as the door and Part1 set as the elevator? The door is unanchored. But the door wont tween.

This is where you are making a mistake. You need to make sure Part0 is the elevator and Part1 is the door.

Keep this in mind:
Part0 is the parent and Part1 is the child.

This is what happens now

Is the door anchored? You need to ensure it is not anchored.

Welds only work on unanchored objects.

But if it is not anchored, then it won’t tween for some reason

There are a few ways to do what you want, but I just remembered something. Have you ever used Motor6D? If you try Motor6D you won’t choose any other option. It’s simple, easy and it’s wonderful to use because it has a property similar to Attachments, independent of the parent’s position. (Similar to Position and WorldPosition)


elv.rbxm (5.4 KB)

Are you sure about that?

Can you show me like what the properties of the parts look like or what the script is?

I have provided a model file for it. You can view it yourself.

Can you check what I have done wrong with mine?
strangeElevator.rbxm (6.9 KB)

After replacing WeldConstraints with Welds just like I said at first, it worked.


strangeElevator.rbxm (7.4 KB)

1 Like