A fresh look at making doors

Hello world!

Most games we visit have doors, each of them have their own respective way of functioning. Today I’m going to share with you my own door build!


So this is an example of the finished product. Not bad right? The best part is that it isn’t even that complicated to create yourself!


I started off by making the door and all parts which are supposed to move. This doesn’t have to be detailed, we can add those later.


Next thing I did was adding a small invisible brick in the middle of the door. Mine’s called ‘Interaction’ for logical reasons. The size of it doesn’t matter. Don’tmake the same mistake like me, and make sure that ‘CanCollide’ is turned off! :smile:

image
Now it’s time to group the door. When grouped, I renamed the door’s parts to something that’s easy to work with and added 2 more assets to the model: an ‘Animation’ and a ‘Humanoid’. This is because rather than programming the door’s movements, we’re going to animate it.

image
The door itself is not ready for animating yet. We need to turn it into a rig before we can. I used a simple plugin called ‘RigEdit Lite’.


The door is now ready to be used to animate. I used Roblox’ built-in animation editor tool.

image
Now we have rigged the door so it can play animations, we have created an opening and closing animation, all we have left to do is make it open when interacted with. I simply inserted a new ‘ProximityPrompt’ in the ‘‘Interaction’’ part, and another script in the ‘ProximityPrompt’. Don’t forget to put the door’s Animation ID into the Animation asset.


When we go into testing mode, we can see the interaction prompt show up. When we interact the door, nothing will happen yet. We still have to program it so it plays the opening animation upon interacted.

image
This is the entire script. Only 10 lines long. I’ve made it so that opening and closing is in one animation. There’s countless ways to tackle this, this is how I did it.

Now all we have to do is make the door look nice. I just started building on it, unioned the parts and welded them to their own door part.

image
And this is the final product. I hope this tutorial helps someone. I pasted the resources I used + a community resources version down below. Feel free to use my prebuilt model for your own games. Have a nice day! :wave:

RigEdit Lite: https://www.roblox.com/library/1274343708
Ready-To-Use door model: https://www.roblox.com/games/6476805311

Edit: Rather than using Humanoids, it’s better to use “AnimationControllers” performance-wise. Credit to BuilderityRBLX and grillme99 for making me aware of this!

19 Likes

if i remember correctly, you can also just add a animation controller.
but other than that great tutorial1!!!

Great tutorial. Good luck on future tutorials, you seem an effective person at teaching.

Amazing tutorial! Simple and understandable and very well explained too! Thank you a lot for making this tutorial.

You should use an AnimationController instead of a humanoid inside the door. Humanoids are pretty expensive and having lots of these doors around with them could have an impact on performance. AnimationControllers still work in the same way, just run LoadAnimation on them.

1 Like