Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Swinging Door Help With Only A Script or Math Behind It?

Asked by 7 years ago

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.

0
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. jtefurd 50 — 7y
0
I would personally use Motor6D's, they are efficient, and can rotate in any direction, given you set the right pivot. TheHospitalDev 1134 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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.

Ad

Answer this question