So I like scripting for people for good practice and problem solving development but I cant for the life of me figure out how to make one of those doors that swing open using only a script. I've gone through so many forums but all they bring up are Motor's, Hinge doors, and other cheap methods. I know I'm supposed to at least add a little bit of code but I have nothing to show for but a lot of research. If anyone could explain to me how to make a door rotate on a specific axis such as the left or right side using only a script and help me understand the math behind it I'd be extremely grateful.
COMMUNITY QUESTION
Swinging Door Help With Only A Script or Math Behind It?
1 answer
Maybe just animate the opening of the door and the closing of the door using many different clones of the door at different angles? But I think this is a cheap method or something.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
If it were me, I'd just create a part for the axis you want. Then, group it with the door, set it as the primary part, and use SetPrimaryPartCFrame() to manipulate the rotation.
I would personally use Motor6D's, they are efficient, and can rotate in any direction, given you set the right pivot.