How do I move two Weld Constraints at once?

Evening everyone, I’m currently having an issue with Welds.
image
In the Image above, there is a Glass Frame Welded to the Hinge above it, this allows it to turn open when interacted with. However, I want the whole Contraption to move Downwards after the Player gets in.

The issue with this however is, I have to weld everything, including the door and hinge to the PrimaryPart. This does technically allow the whole model to move downwards but the door no longer opens when interacted with, it’s just static.

The only thing that is Anchored is the Main Body of the elevator.

Any help is appreciated. The only solution I can think of is moving them seperately but this might cause issues depending on player preformance (?) and would look jittery and inconsistent. So im asking if there’s a better alternative

Nevermind again, I fixed the doors being unable ot open but I had to anchor the Hinges to do that. if I unanchor them they still don’t move the door even if the door is the only weld connected to them

If I Anchor the Hinge, the Doors are left behind when the elevator descends, but the door opens as intended
image
If I unanchor the Hinge, then the Door can’t open so people can’t walk inside the elevator at all.

Try to use a WeldConstraint.

They’re all Weld Constraints (Char Limit)

I probably should’ve specified that in the title, i’ll change it

Strange. I have a few questions, so that I can attempt to replicate this and find a solution.
First: when you say static, what exactly do you mean?
Second: how are you moving the door? Are you using a tween? Are you setting the position every few seconds?

I only just realised your title change, feel free to still answer my questions though.

1 - By Static, I mean that when the Hinge is Unanchored, the Door doesn’t seem to move at all unless the model itself in its entirety moves.

this means that while the door moves when the elevator goes down, the doors do not open from the rotations specified in a script:

local DoorTween = TS:Create(DoorHinge,TI1, {CFrame = DoorHinge.CFrame * CFrame.Angles(math.rad(Rotation),0,0)})

^^
This does work but only if the Hinge is anchored.

2 - I’m moving everything via CFrames with a Tween, yes.

3 - if this helps, below is a set of images of whats happening when the hinge is anchored vs when it isn’t:

Anchored Hinge

Door Opening: Fine
image

Elevator Leaving: Broken
image

Unanchored Hinge
Door Opening: Broken (doesn’t open)
image

Elevator Leaving: normal
image

Quickly just grabbing a part from the docs and it says:

  • If a welded part’s Position is updated, that part will move but none of the connected parts will move with it. The weld will recalculate the offset from the other parts based on the moved part’s new position.

Perhaps you could try that? Let me know if anything changes.

edit: Taking a closer look at the page, editing the CFrame of a part will cause all welds to move with it, so that it will maintain the offset. I don’t know any clear fixes for this, but hopefully this helped.

1 Like

Yeah, I saw this when looking around other pages, using position only moves the target object in question which is why I used CFrames which were said to move connected parts, but its not working here, unsure why.

thanks though.

I think I have a solution again! it’s pretty simple in retrospect

Since the issue was focused on the Hinge being Anchored, and WeldConstratins don’t break like Welds Do, what I did was simply just toggle the Anchor off when the elevator is told to move down, moving the whole model, then I should be able to toggle the anchor back on which allows for the door to move again.

I only have the elevator moving down currently, so i’ll test if it works after coming back up, but this seems to work!

edit: it does indeed work, I noticed a slight jolt of the Hinge but this was probably because of how I asked it to return based on the position of the elevator and not its own old position.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.