How do i make these closet doors openable

Im making a closet for my game which is supposed to be able to open. I have the closet itself, 2 doors and a hinge for each door. Doors are welded to hinges and hinges are welded to closet.


But when i try rotate the hinges the whole closet rotates which makes sense cause the hinges are welded. But how else do i do this? They need to be attached to the closet and anchored is not an option cause you can drag things around in my game so things cannot be anchored. Ive also tried playin around with hinge constraints but that didnt work (maybe i did it wrong idk)

Why are you using Hinge parts instead of actual HingeConstraints

no idea i just saw someone use hinge parts somewhere but are hinge constraints the solution? cause i tried a bit but couldnt get it to work

Yes, obviously. Depends on your usecase however

There are many ways to do this. You could use HingeConstraints, which is the “proper” way to physically simulate doors that can swing open and react to motion. To set this up:

  1. Insert an Attachment in the main Closet body part. Move it to where the door hinge connects.
  2. Insert another attachment inside the door and move it to the exact same CFrame as the other attachment. Tip: you can match the CFrames exactly by copying the WorldCFrame from the first attachment into the second.
  3. Insert a HingeConstraint into the door and match Part0 to the closet attachment and Part1 to the door attachment.
    When you have the HingeConstraint selected, it will show you useful information about the orientation. Notice the orange disc, that’s the way the hinge rotates. For this door, you want it to face down/up. Think of the disc as a ‘wheel’ that rotates around its axis.
  4. We need to change the way the hinge rotates. To do this, we need to change the orientation of our attachments. In this case, changing the Z to 90° should work.
  5. To stop the door from rotating inwards, use LimitsEnabled in the HingeConstraint. The angle will also be previewed visibly on the hinge whilst selected.
  6. When you do the same for the other door, I recommend you add a NoCollisionConstraint to one of the doors, then set Part0 to the left door and Part1 to the right door, so they don’t get stuck on each other and prevent fully closing.

To trigger the door to open, you can set the ActuatorType on the HingeConstraint to “Servo”. This turns the hinge into a mechanical joint that tends towards a target angle. To open/close the door, set the TargetAngle to a specific number (e.g. 0, or -90). Remember to set the MaxTorque (how strong the hinge motor is - should be a large number like 100-1000) and AngularSpeed (how fast the door opens).

ea7dbac024fbc01aab28a0669c0a1101

1 Like

Are you trying to have users push them open manually or click on them to open?

thank u so much!!! i got it now!!!

1 Like

click on them but i got it to work now with the hinge constraints👍

2 Likes