So I’ve made a tween script to change the orientation of a door. I thought that the rotation should happen according to the position of the PivotPoint. Which is located here:
Or you could just have an Anchored ‘hinge’ Part where you want the door to rotate at and tween the ‘hinge’ angle.
Weld your Unanchored door to the ‘hinge’ and it’ll work just fine.
This only adds 1 part and 1 weld to each door. Even if you have thousands of doors it probably won’t cause any lag.
Where is your hinge Part in that. It’s supposed to be at the location your PivotPoint was at.
Are you sure the door has a WeldConstraint to the hinge Part? It looks like it has a HingeConstraint or BallSocketConstraint joining it.
Another thing, you don’t need the elseif is_open == true then statement, just make it else since the first if statement already covers one condition so you don’t need to repeat it again for the opposite condition.
I’ve done exactly what you’ve said but the door this time is completely frozen. I don’t know why I a weld part that acts as a hinge could fix this issue. It’s meant to glue the part and preventing it from moving, a thing I’m not searching for
You anchor the hinge part that is tweened.
You Weld the unanchored door to the hinge part.
Make sure you don’t have the door welded to anything other than the hinge. You can go to the Model tab in Studio, look in the Constraints tools, and choose “show welds” to let you know if you have WeldConstraints properly placed. If you select the green or gray weld line it’ll also highlight the 2 connected Parts.
When the hinge part tweens and rotates on its axis, the part (or parts) that are welded to it rotate with it.