I want to be able to have a door that swings back and fourth using the hinge and spring based physics system without the door being collidable. I’m guessing I can do this by having a touched script for the door and have a force activate/move it everytime it’s touched but I’m not sure what kind of code correlated to springs and hinges that could cause such an effect. I have an example below from Gas Station Simulator. If anyone has any better ideas how I can replicate the effect that’s not exactly how I described I believed it worked, that is welcomed as well.
You should be able to just put a TorsionSpringConstraint and a HingeConstraint to spring the door to center.
The other way is to make the HingeConstraint a Servo and have a touch pad on either sid that opens it away from the player.
Unless, I’m understanding something wrong, this is what I’m using. The door has a spring and hinge constraint, but I’m not sure what kind of function will cause it to swing. I’m looking for an API reference that will help me with this.
Just the player walking into the door, like in real life.
If you want the door to open before the player gets there then I have a free model using a HingeConstraint set to Servo that I made for people here when quite a few were asking about how to do it. Door using HingeConstraints and script - Roblox
Sorry, I forgot to reiterate that I wanted it to be noncollidable. I understand that those contraints are used, but I’m trying to make it noncollidable like the one in the video. Appreciate the links though.
Well, I guess you can argue that itll do the same non-collided, but the one in the video retains physics rather than just rotating at a set angle like in your script, if you have any ideas how I can do this, please let me know!
Wait I realized it’s NOT noncollidable but rather just very loose… If I don’t happen to find which property “loosens” the hindge, do you mind telling me which one it is?
If it’s the HingeConstraint then use the ServoMaxTorque.
If you use a TorsionSpringConstraint then it’s the MaxTorque.
You can read this guide as well: Mechanical Constraints | Roblox Creator Documentation