local TweenService = game:GetService("TweenService") local door = script.Parent local doorHinge = door.PrimaryPart local doorOpen = TweenInfo.new() local doorCFrame = TweenService:Create(doorHinge, doorOpen, { CFrame = doorHinge.CFrame * CFrame.Angles(0, math.rad(-100),0)--Change 100 to whatever value. Range of swing. }) local doorCFrameClosed = TweenService:Create(doorHinge, doorOpen, { CFrame = doorHinge.CFrame * CFrame.Angles(0, math.rad(0),0)--Change 100 to whatever value. Range of swing. }) local ProximityPrompt = script.Parent.ProximityPrompt local PromptVanish = ProximityPrompt.Enabled == false local PromptAppear = ProximityPrompt.Enabled == true ProximityPrompt.Triggered:Connect(function() doorCFrame:Play() ProximityPrompt.Enabled = false script.Parent.Open:Play()--rbxassetid://192416578 wait(3)--Door Stays Open this long doorCFrameClosed:Play() ProximityPrompt.Enabled = true wait(1) script.Parent.Close:Play() end)
@SomeRando82213 жыл бұрын
@@ixkryptzon3173 ShowWelds isn't showing. Did everything correctly.
@bootyjiggle9993 жыл бұрын
@@SomeRando8221 same for me
@learnpaper93783 жыл бұрын
@@SomeRando8221 in the new update instead of the icon that says showWelds they made it a small icon without text, you have to find it
@learnpaper93783 жыл бұрын
my guy
@november9810 Жыл бұрын
no words can express how much I needed this tutorial, I have been trying for MONTHS my guy, I owe you holy hell my dude
@Corporal_Ghost183 жыл бұрын
Thankyou so much dude!, I wasted an hour on another video just for the door not to work, but luckily I came across this video and was able to make the door work within minutes. THANKYOU
@gamer100life3 жыл бұрын
yo i needed this tutorial for my game thank god i was subscribed
@ixkryptzon31733 жыл бұрын
So glad it helped! You commented fast xD
@beiberns3 жыл бұрын
Thanks, man, this was definitely helpful. Easy to understand, slow enough to follow, fast enough to not waste time. I approve.
@Lusionxel3 жыл бұрын
is it me or does this guy have a really calming voice
@ixkryptzon31733 жыл бұрын
A lot of people say that. Idk why, but thank you. 😊
@not_gianluca3 жыл бұрын
This is honestly great. Literally worked perfectly. I had a problem when I put the door next to a few walls but I figured out the problem If anyone else has struggled with this let me explain how I resolved it. So basically just click an object that is above or below the hinge and then turn off CanCollide and CanTouch and it should be fixed. Other than that, great script and great video. You my friend, have earned a subscriber!
@ixkryptzon31733 жыл бұрын
Awesome! So glad it worked for you!
@brentwelch22813 жыл бұрын
Joe mama
@MeWhenNoOneAsked3 жыл бұрын
god it actually worked. this channel is soo under rated bru
@mrchooc20382 жыл бұрын
Thanks! this was exactly the tutorial I was looking for! Also thanks for the tip on changing move and scale to .2 it really helps with my building! :)
@starxlajay13 жыл бұрын
THANK YOU MAN ive legit been looking for someone that makes door animations for so long and i find them put they dont add the scripts so like yeah thats man
@nimpsonkinkson1924 Жыл бұрын
For anyone having trouble, check your proximityprompt directory and stuff, I had mine placed in an object positioned to the door knob and the script couldnt find it but when I placed the proximityprompt directly to the door model, it works! I'm new to this stuff so this is just for anyone else having trouble like me, check your proximityprompt
@AlexhthGamingАй бұрын
OH MY GOD! THANK YOU! I'VE BEEN TRYING TO FIND A TUTORIAL ON HOW TO MAKE A DOOR WITH MULTIPILE PARTS, BUT THERE WAS NONE :(
@Noekecc3 жыл бұрын
dam this tutorial went in full depth, i really like it and i might use this later on when i get back on to roblox studio which i am not sure when that's going to happen but awesome tutorial! :D
@ixkryptzon31733 жыл бұрын
You should definitely get back into it! :D
@Ricardo-dn5fr3 жыл бұрын
Really good script, didnt have to change much with the script to make a locking and unlocking system. Thank you, exactly what I needed.
@mousepad26752 жыл бұрын
wow this is the only door script that actually worked for me, thanks alot im subbing
@IridescentEquines2 жыл бұрын
Thank you so much for this! I have been trying to figure this out for months and this worked perfectly!
@vidia1064 Жыл бұрын
if you want to use unions for the ‘parts’ of the door it works you just have to make sure to remove the automatic Weld from the Union. When you click on your Unions there should only be WeldConstraint.
@TheDisfunctionalOne3 жыл бұрын
best video on how to make a swinging door i've seen, good job!
@lat18693 жыл бұрын
Thank you very much, this was very useful to me. For the people scrolling down the comments to see if it worked: it did for me.
@c0ral7653 жыл бұрын
Tip: In "ProximityPrompt" Turn off "RequiresLineOfSight". This will make it so you can actually use the door if it's placed in a door frame.
@goop.3 жыл бұрын
ty bro
@luneee0933 жыл бұрын
the script is : local TweenService = game:GetService("TweenService") local door = script.Parent local doorHinge = door.PrimaryPart local doorOpen = TweenInfo.new() local doorCFrame = TweenService:Create(doorHinge, doorOpen, { CFrame = doorHinge.CFrame * CFrame.Angles(0, math.rad(-100),0)--Change 100 to whatever value. Range of swing. }) local doorCFrameClosed = TweenService:Create(doorHinge, doorOpen, { CFrame = doorHinge.CFrame * CFrame.Angles(0, math.rad(0),0)--Change 100 to whatever value. Range of swing. }) local ProximityPrompt = script.Parent.ProximityPrompt local PromptVanish = ProximityPrompt.Enabled == false local PromptAppear = ProximityPrompt.Enabled == true ProximityPrompt.Triggered:Connect(function() doorCFrame:Play() ProximityPrompt.Enabled = false script.Parent.Open:Play()--rbxassetid://192416578 wait(3)--Door Stays Open this long doorCFrameClosed:Play() ProximityPrompt.Enabled = true wait(1) script.Parent.Close:Play() end) for those who are lazy like me lol
@TheBeanConsumer3 жыл бұрын
thanks
@Fendi._3 жыл бұрын
TYSMM
@luneee0933 жыл бұрын
Or you can get the model and copy the script
@slaplily3 жыл бұрын
How do you make it so when you open the door it doesn't close automatically, instead you can close it by pressing close
@roseywolf78673 жыл бұрын
God thank you I've been trying to find how people make doors with the Proximity Prompt I never knew that existed I'm new to Roblox Studio and Lua but hopefully I can make my own game soon
@DimBlox2 жыл бұрын
Extremely underrated! Thank you for the help!
@oneupaj3 жыл бұрын
The best door builder...
@callsignalps7383 жыл бұрын
Thanks man been looking so long for something good thanks again
@imjustarock33013 жыл бұрын
mans underrated
@05-3thekid63 жыл бұрын
Thank you so so so much!!! It works and I am so happy. Thank you! I subbed!
@_Bobby3735_2 жыл бұрын
Been looking for a video like this for ages your a life savour
@TheMcHunter2 жыл бұрын
same
@00kormtsou3 жыл бұрын
i can't belive i made my own door, i though it gonna hard to do but this man make it eazy :DD
@happyassasin20973 жыл бұрын
It worked! 😁👍 thanks bro!
@uptownfunkog2 жыл бұрын
Super Helpful!
@sikosul3 жыл бұрын
thank you bro. You helped me to create the door.
@dogglu5 ай бұрын
This video Was VERY helpful ty very much it means a lot how you explained it :)
@unifores10 ай бұрын
I think proximity prompts don't work inside models, but only inside parts/meshparts, for 2024 at least.
@TopHatDeveloper6 ай бұрын
they do work inside models i believe u broke smth
@Katt_the_boi3 жыл бұрын
thank you this was super duper helpful :D
@focat3 жыл бұрын
This man is the *god of door detail*
@DubDuberr3 жыл бұрын
I have never seen a tutorial so good
@TrendyBanana3 жыл бұрын
Hey, My door doesnt close, can you help? Its the exact same code as yours
@purplescientist3 жыл бұрын
Time to make the door alt+f4 to open
@zuveresgames2 жыл бұрын
Good troll
@jonriver30962 жыл бұрын
O_O
@dylan_nom2 жыл бұрын
Good one, I’ll try it👌😅
@purplescientist2 жыл бұрын
@@dylan_nom bro took 1 year to answer ☠💀💀
@dylan_nom2 жыл бұрын
@@purplescientist answer what, me?
@louque49782 жыл бұрын
thanks for teaching me it works but it rotates the hinge and not the door
@yeetwarriorcattt61332 жыл бұрын
Make sure the door itself (excluding the hinge) is NOT anchored
@Every_Ytberfan2 ай бұрын
This is going straight in my playlist
@jnplorix2 жыл бұрын
just a quick question, is there a video that you can smash open doors like nicos nextbots? im making a nextbot game and i think it would be really good with the gameplay
@mak_mak20162 жыл бұрын
Hello, I am making pool gates, and I was following all the directions. I copied and pasted the script though it didn't work, so I don't know what to do now.
@vel19413 жыл бұрын
Good tutorial! This will really help out with my project
@hauntedhallowspi85613 жыл бұрын
ok, so im new to scripting, ive only done the building and 3D modeling. but i do know what you explained works through "if" and "else" but for some reason it doesn't work, like the last tutorial i watched that was only a year old, used "if and else" but even though i had done everything the exact same way he did, it didn't work. i don't want to seem like a Burdon, but how do you think i need to put it in? and if you could right a script that we can just copy and past where its needs to go. i think that would help all of us here trying to make the door.
@gamesinreallife75453 жыл бұрын
yes!!! same. how would i put it in the script so that it works the way i need it to?
@TheTrustyTruck3 жыл бұрын
Hey did you make the welds before or after grouping it and if after did you do it before or after making the hinge primary
@ixkryptzon31733 жыл бұрын
Hey, you need to group the model, and set the primary part before you use the weld tool.
@TheTrustyTruck3 жыл бұрын
@@ixkryptzon3173 aight
@minitinybites3 жыл бұрын
@@ixkryptzon3173 Hi, how do you make it so you can only hear the door opening and closing when you are near the door area, because right now you can hear the door opening and closing around the entire map, and i cant seem to figure out what controls the sound distance.
@Luuk_3 жыл бұрын
Hi! do you know how i make the door close slower? If so, thanks!
@haydenalmeida3 жыл бұрын
Erase the line 4 of his script and put this: local doorOpen = TweenInfo.new(8,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0) where the first parameter "8" is the time in seconds.
@Mr_AmmoTV3 жыл бұрын
subbed for sure amazing vid man
@silentdemure42153 жыл бұрын
Works like a charm, thanks!
@animeSlayeri2 жыл бұрын
Nice tutorial. One issue, the Proximity prompt vanish and appear variables are pretty much useless. get rid of em for a more cleaner look n readable. you can just say ProximiityPrompt.Enabled = false and true
@w3irdw0rld552 жыл бұрын
hey! when i press the open door thing, the hinge opens not the door. if you know how its happening and how i can fix it, pls tell me :)
@pickled_alexia56792 жыл бұрын
Did you fix it or it still does it cause I. Have the same problem as you
@pickled_alexia56792 жыл бұрын
I can help you
@kimheferle66582 жыл бұрын
@@pickled_alexia5679 how??
@3ldryn3973 жыл бұрын
this was soo helpful the other ones i found where one part doors that just went pasthrough
@PesadeloSonho2 жыл бұрын
Your tutorial, along side another one, was the only tutorial that worked with my door which had more than one material. I'm super greatiful. Thank you a lot! I have just one question: Can I change the speed of the door closing and opening? If so, where?
@4hourslater4603 жыл бұрын
Is there a limit to how many parts can be in the door? cause a door model I made will not work with this for some reason.
@spieler59573 жыл бұрын
Cool!!! Ima do this on my build with your credits
@n4dirrr3 жыл бұрын
Your door design is similar to the door design I was planning to make for my game "Peephole 2"
@megvuru3 жыл бұрын
Sounds fun.
@xircle40963 жыл бұрын
Thank you so much, keep it up man!! Btw 0 dislikes! IMPRESSIVE!
@luke.warm.freelance3 жыл бұрын
Tysm. Your so helpful. Great tutorial. Would like to know how to hook a keycard reader up to it
@hauntedhallowspi85613 жыл бұрын
hey, how do i change the scrip so that it doesn't close on its own? i need players to be able to just close it them selves,
@hauntedhallowspi85613 жыл бұрын
script*
@gamesinreallife75453 жыл бұрын
yes, I need to know this too!! your script works better than the rest of the tutorials out there, but I don't want it to close on its self.
@ixkryptzon31733 жыл бұрын
Hey, sorry for the late reply. In the script, it says wait, and then runs a command that closes the door to it's original position. Remove everything after the wait. This will keep the door open. If you wish to close it, add to the beginning of the script, a function that checks if the doors position is in open. If it is, do nothing, but if not, move it to that position.
@hauntedhallowspi85613 жыл бұрын
ok, so i know what you explained works through "if" and "else" but for some reason it doesn't work, like the last tutorial i watched that was only a year old, used "if and else" but even though i had done everything the exact same way he did, it didn't work. i don't want to seem like a Burdon, but how do you think i need to put it in?
@tehrubygamer63843 жыл бұрын
@@hauntedhallowspi8561 Did you ever figure it out?
@thatoneperson9830 Жыл бұрын
Is there anyway to make it stay open until pressed again? And make it so you click instead of press e?
@jaxon1913.3 жыл бұрын
great video!!! It helped me out soo much! TYSM New sub :)
@plaguedoc95923 жыл бұрын
You deserve my like for helping me make a door
@juju_le_belge7 ай бұрын
if u use weld constraints when an explosion hits them its gonna break which is very funny
@domino1602 жыл бұрын
ayo do you know why some of my welds are inactive?? it might just be my door build but it only brings a few parts that have the active welds w it and the activate option wont work either, its not a problem about anchoring also so idk
@sarantosanimations99363 жыл бұрын
oh my god this is the first tutorial to work thank you so much
@sarantosanimations99363 жыл бұрын
speaking of this, why do you have less that 1k subs. PEOPLE SUBSCRIBE
@7KMq3 жыл бұрын
the plugin isnt showing up in my plugins tab is it a virus?
@remdeeznuts3 жыл бұрын
nah its not a virus, something might have happen that it's not showing, or maybe you can't fnd it-
@7KMq3 жыл бұрын
@@remdeeznuts i did figure it out you have to download it then go into your toolbox go into your items then press install
@wyr_nomad3 жыл бұрын
Hey thanks for the great video, everything works just fine. A quick question (I figured how to slow it down but now I have another question) After it runs the script the Proximity Prompt does not show up, even though it is scripted to. What do I do? Thanks again for the marvelous video and thank you thank you thank you thank you thank you SO MUCH. Keep up the absolute great work man! fucking edit again : GOD IM SORRY! i figured it out AGAIN so no need to help. SORRY SORRY SORRY. Love you though! Keep up the absolutely fantastic work man!
@robloxiansexclusive17813 жыл бұрын
can you help me how you did it pls
@wyr_nomad3 жыл бұрын
@@robloxiansexclusive1781 slowing down, or fixing the proximity prompt?
@Luuk_3 жыл бұрын
How do u slow it down?
@Elite4592 жыл бұрын
how to do a double door i put them beside each other and 1 of 3 things happen 1. it falls apart 2. it adds welds which prevent it from moving, i delete it then i either copy and paste it or move it and the welds duplicate and break again 3. they just dont open
@Heartz4gabby2 жыл бұрын
Thank you for this tutorial! I am gonna subscribe after this.
@tiffanyh.14143 жыл бұрын
This is amazing! Could you do a tutorial for a double door that open the same way but different directions?
@ixkryptzon31733 жыл бұрын
I'll see what I can do.
@tiffanyh.14143 жыл бұрын
@@ixkryptzon3173 thank you so much!!
@ixkryptzon31733 жыл бұрын
@@tiffanyh.1414 of course. I'll try to have a video up within a couple days for you.
@Kyle-jg3qb3 жыл бұрын
Thank you so much! You just earned yourself a subscriber
@galric42703 жыл бұрын
got everything welded but I can't make the weld active so it means the hinge moves without the door, know how to fix?
@ixkryptzon31733 жыл бұрын
Hello there. When you go to use the weld plug in, make sure the door and the hinge are in the same model. The door cannot be a model before you group it with the hinge. It needs to be just parts.
@galric42703 жыл бұрын
Yeah I ended up fixing it, I accidentally welded the main door model to the baseplate meaning that the hinge couldn't turn it. Thanks for the help though!
@ixkryptzon31733 жыл бұрын
@@galric4270 Glad, you got it working!
@hellvetiks3 жыл бұрын
Totally functional, thank u bro!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11!1!!!!!!!! (but really tnks for the tutorial.)
@UnhingedVideos7763 жыл бұрын
This helped SO MUCH Thank you so much omg
@daresetter77513 жыл бұрын
Great video! Worked for me in the end, but I had to do some tinkering with the angle the door opened at. It seemed for some reason it was swinging up, like off the ground. Luckily I had dabbled in scripting and was able to mostly tell what was going on. Adjusted the value of the angle the door opened and boom. Dont know why it was like that, but it was most likely some change I did on my end that messed it up. Again, great video.
@warningsirensofnorcal6573 жыл бұрын
How did you fix it? It does the same for me
@daresetter77513 жыл бұрын
@@warningsirensofnorcal657 In the script, a couple lines down, you should see a message saying "Change 100 to whatever value. Range of swing." Tinker with that for a bit. Thats how I got it to work.
@warningsirensofnorcal6573 жыл бұрын
@@daresetter7751 can you just tell me how to do it? Im confused as I have never done scripting before.
@door99342 жыл бұрын
After revisiting the video it worked for me thank you
@TheLegendAcc Жыл бұрын
TY MAN!! IM TRYING TO DO THIS FOR HOURS! YOU GOT A SUB FROM ME!
@Foogles3 жыл бұрын
im having issues getting the plugin, i installed it but it not popping up ive looked in the "Manage plugins" and it wast popping up there either pls respond if u can
@7KMq3 жыл бұрын
same
@7KMq3 жыл бұрын
well i think i know whats happening, its a roblox glitch happening for now. since we all experienced this at near the same time
@7KMq3 жыл бұрын
I figured out how to fix this enigma, after it said you have installed it, go into your toolbox. After that go into your items, then into your plugins and click the model weld then press install.
@devscorner26813 жыл бұрын
same
@meganb77493 жыл бұрын
@@7KMq thanks, it worked for me
@Peteer3 жыл бұрын
How do I make it close by pressing the button once more?
@tholl-qc3 жыл бұрын
thank you so much. This realy helped me
@SolarBaller Жыл бұрын
yooo thx a lot it worked definitely subbing
@anoushattar53862 жыл бұрын
Can you make one where the character is also animated opening the door?
@jahqovich2 жыл бұрын
very smart, hope he does this
@Kecho-1172 жыл бұрын
Thank you bro, it end movement looks smooth
@breezybeater88933 жыл бұрын
For some reason, when I look at the welds alot of them are inactive, and when I interact with the proximity prompt, it pulls some of the door, but not all of it, and since collision is on I pretty much cannot enter through the door and the hinge moves part of the door only.
@familyaccount2623 жыл бұрын
Thank you so much dude i hope get 10k subs soon
@daniel233842 жыл бұрын
mine works, it just goes vertical, not like a regular door. what do i need to do to fix it?
@kabeam56432 жыл бұрын
make a new hinge model, dont duplicate a block from your door model, then add it back into the model, rename it, and re-weld everything
@kiiro_lily3 жыл бұрын
Thanks for helping me scripting so early! I'm still 9. And this helps me a lot for my future dreams!
@3inspire5223 жыл бұрын
Thanks for this, I'm going to like it so I can use it later
@owenharris28132 жыл бұрын
Thank you for this Door script i have been looking about for one for agers.
@ErinsAura Жыл бұрын
It worked for a while but then the Weld Constraints suddenly became inactive so only some were left active and the door wouldn't fully work. When I tried to make the Weld Constraints active again, it would not let me so the door was broken with no way to fix it. And here I was thinking that it actually worked. Dont believe everything you see on the interent.
@Tessa3yearsAgo Жыл бұрын
I am having the EXACT same problem. I don't know if it's because this tutorial is outdated or something but my weld constraints continue to disappear and I have no idea why. Everything worked perfectly for the first couple of days. I built this door to be a part of a house I've been building, once the entire house was finished I made all of the parts, including this door model, a part of the House model. After that is when my door messed up, so I thought maybe I screwed it up by grouping into another model. Google seemed to confirm my suspicion because I read that if parts are parented to another part, the welds will disappear. So I ungrouped the door model from the house model and regrouped it into it's own model again (confusing, I know). Well, this didn't work, either... the welds still wouldn't stay. Remembering that I had saved my door model to Roblox toolbox, I deleted the old one and added it again from the toolbox menu. The constraints STILL weren't there and no matter how many times I add them, they WILL not stay. It's very frustrating and I have no idea how to fix this. If someone reads this and knows what the solution is, PLSS share it with us. I need a working door.
@Tessa3yearsAgo Жыл бұрын
Update: I completely rebuilt the door, went through the whole process again. The welds stay as long as I do not move the door. If I move the door model at all, they disappear. I have no idea why this happens, but at least my door works as long as I don't move it.
@sol_jlr3 жыл бұрын
is there any chance you/someone knows how to make it so the opening/closing sound is local? i tried switching to a local script but then the door wouldn't open. i just don't want it that everyone in the game hears when someone opens a door thats not even near them
@mergingkibbles39243 жыл бұрын
the door works perfectly for me but when i try to put it on its frame it wont work, im guessing its because of the extra weld being added but when ever i try to resize the door to fix it the the main weld goes away
@Cadzada3 жыл бұрын
The main part cant be in the wall it can touch it but cant go in
@rayirthacharya2 жыл бұрын
this is very useful i can now make my roblox FPS game you got +1 sub
@avix61103 жыл бұрын
How can I make it so, I dont have to wait.. but instead i close it myself?
@kiitk_at32643 жыл бұрын
Thank you so much this is the first video that actually helped me!! I do have one question. I don't know much about scripting, so how can you make it so the player can close the door by them self? Instead of the door closing automatically.
@FadeMouse3 жыл бұрын
Hey, the door isn't closing. Can I have some help? Edit: Nevermind! I got it to work. Originally, I hadn't added the sound in because it was optional. But I added it in and now it works. Thanks for the great tutorial!
@iddraizzafiq3 жыл бұрын
I've subscribed, I have some question why do my door is can only open but cant close I waited 1 minute to see if it close?
@Elite4592 жыл бұрын
they keep breaking ill put them beside each other and theyll just fall apart but when they arent beside each other they work fine, or a weld will apear which keeps a part from moving so i delete it, test it, its work fine, go back to edit mode and it reappears if i put it beside another door. it either falls apart or doesnt move idk what to do i feel like a bmw owner plz help
@vanillaanova3 жыл бұрын
idk what welding means ._. can you tell me cuz when i perform the action the hinge moves but not the door btw i dont hvae the weld plugin i just manually turned on the welding
@ixkryptzon31733 жыл бұрын
Hey there. Welding is basically a way of connecting two parts together. When you weld two parts, they kind of become a union, but they are still separate. If you dont weld the door to the hinge, it wont swing open with it.