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

A script to make doors swing open on touch?

Asked by 10 years ago

Hey, I need some help. On my map there is a small building and the doors there are just walk through as of now. But someone recommended making the doors swing open.

What I want to know is how would I script the blocks that are the doors to swing open when a humanoid touches them, Not with a mouse click though, Just walking into it.

(I'd include a script, But sadly I'm quite 'fresh' so to speak with it.)

Thanks.

1 answer

Log in to vote
0
Answered by
painzx3 43
10 years ago

Well that depends on what you want the "swinging" action to look like, you can always include a hinge joint so for example, you can resize a part and put a hinge joint on the top left and bottom left corners and then build a door frame to attach the joints to, however, sometimes the joints can go haywire and cause the door to come flying the moment it moves but it's rare. If you want it to be a smooth open movement, you need to use cframe or an animation. With cframe you can use a script and use Vector3 values (if i'm not mistaken), but I'm not familiar with that yet.

Ad

Answer this question