How To Make An E To Open Door In Roblox Studio (Easy & Quick)
Vložit
- čas přidán 9. 09. 2024
- How To Make An E To Open Door In Roblox Studio (Easy & Quick)
In Today's Video We Will Cover roblox studio,roblox,roblox doors,doors roblox,roblox studio tutorial,roblox doors monsters,roblox studio how to make,roblox doors game,roblox doors meme,roblox studio how to,roblox door,roblox scripting tutorial,roblox tutorial,how to make doors in roblox studio,doors remake roblox studio,how to make doors in roblox,roblox studio doors,roblox door tutorial,roblox doors animation,roblox doors short,make a door in roblox studio,roblox studio door
pastebin.com/d...
Who knew making something so simple like a door could be so frustrating and time consuming? Great video. Thank you.
If anyone is having trouble, Remember that roblox studio is very finicky and one minor thing done wrong will throw off the thing not working.
its roblox what did you expect, you have to write a 30 line unreadable code for one product purchase
And someone said “Lua is easy 🤓
oh my god.... i was trying for days to actually make a door... i even found one that was extreamly simalur to this, but i couldnt figure out the isuse at all, but yours totally worked!!!!!!! thank you so much!!!! i saving this code so i NEVER have to do this from scratch AGAIN!!!! thank you!!!!!!! i cant even explain the amount of frusterated crying this saved me!!!!!!!! THANK YOU!!!!!!!!
(also, thank you to the person who said you can check what the problem in the code is by typing /console into the chat when youre testing it!!!!!!! thank youuuuuuu!!!!)
If you guys have an issue where when you open the door and it opens going down into the ground like instead of back and forth like intended then change goalOpen variable to this:
local goalOpen = {}
goalOpen.CFrame = hinge.CFrame * CFrame.Angles(90, math.rad(0), 0)
hope this helps!
For anyone having trouble, you can check the console while playtesting for any errors and to see if your script is even running. To do so, type /console in chat or press F9. I followed this step by step and spent 10 minutes trying to figure out why it wasn't working just to find out that I accidentally entered a single space before typing "Door" to rename my door.
Thank you so much. Just found out that i put the script with the door itself and had to rename the hinge and side.
oh my god, i was SO frusterated that i didnt know what the real problem with my code was! thank you for telling me how to check it!!!!!! this is a life saver!!!!!!!!!!!!!!!! i cant thank you enough!!!!!!!!!!!!!!!!!
TYSM BRO!! THIS HELPED A LOT!!
Amazing tutorial! I've tried many other door tutorials, but they all didn't work. Until I found this one! Thank you so much for posting this video. It helped me allot!
If you can’t find create on new Roblox studios,go to constrains then click the triangle and then click create.Hope this helps(idk if it’s on pc)
Man, thanks. I was so confused. God bless you
For those who have a whole door thats a model, you can turn it into a union then it should work. If the door has meshes in it, the union wont work
tysm!!
how do you turn in into a union??
It didn't work for me at the beginning, but what I did was change the name of the parts to how they were exactly copied in the script, with capital letters and without spaces, when I tried it after doing that, it worked
If your door is going the wrong way make the hinge and handle upside down
it kinda worked,but kinda failed. it did say (press e to interact) but when i pressed e it didnt open. can someone help?
me too it happens it shows e to interact but does not open
Fun fact, With 'your' code I had a bug that helped me
Try this way no anchor and Change weld position
thank you so much i will make great use with doors
this is a local script. in a multiplayer game it doesnt open for anyone else
THANK YOU FIRST ONE THAT WORKS
If anyone could tell me why only the hinge/side is moving but not the door, that would be great!
The door is probably anchored
all yalls scams. i just made my custom door and none of these work so can yall just do it for me and matter fact yall can just script my whole game atp
(for the people who are in a country where pastebin is blocked)
local TweenService = game:GetService("TweenService")
local hinge = script.Parent.Hinge
local prompt = script.Parent.Door.ProximityPrompt
local goalOpen = {}
goalOpen.CFrame = hinge.CFrame * CFrame.Angles(0, math.rad(90), 0)
local goalClose = {}
goalClose.CFrame = hinge.CFrame * CFrame.Angles(0, 0, 0)
local tweenInfo = TweenInfo.new(1)
local tweenOpen = TweenService:Create(hinge, tweenInfo, goalOpen)
local tweenClose = TweenService:Create(hinge, tweenInfo, goalClose)
prompt.Triggered:Connect(function()
if prompt.ActionText == "Close" then
tweenClose:Play()
prompt.ActionText = "Open"
else
tweenOpen:Play()
prompt.ActionText = "Close"
end
end)
This was such a lifesaver.
the description 🤣
thank you so much for making a awesome video like this the doors work perfectly for my house i made and suits it well
can you PLEASE do a tutorial on a bifold closet door?? i can't find a single tutorial on it and i've been trying for HOURS to make it myself 😭😭😭😭
Thaanksss!!!! I love your video
ik this tutorial old as hell but it works
Works amazingly! But if I wanted to have many doors in one game like this, what would I add to the script if I wanted to move it into serverscriptservice and put the doors in a folder? Tysm
Whatever I do it doesn’t work for me
0:18
Try this script if the door opens the wrong way:
local TweenService = game:GetService("TweenService")
local hinge = script.Parent.Hinge
local prompt = script.Parent.Door.ProximityPrompt
local goalOpen = {}
goalOpen.CFrame = hinge.CFrame * CFrame.Angles(90, math.rad(0), 0)
local goalClose = {}
goalClose.CFrame = hinge.CFrame * CFrame.Angles(0, 0, 0)
local tweenInfo = TweenInfo.new(1)
local tweenOpen = TweenService:Create(hinge, tweenInfo, goalOpen)
local tweenClose = TweenService:Create(hinge, tweenInfo, goalClose)
prompt.Triggered:Connect(function()
if prompt.ActionText == "Close" then
tweenClose:Play()
prompt.ActionText = "Open"
else
tweenOpen:Play()
prompt.ActionText = "Close"
end
end)
------------------------------------------
I changed the 90 to the left so it would open the right way
It kinda works. I made my door on a part, which is supposed to be the floor. I scaled up the part so the door can be higher off the ground (I'm adding stairs), but the moment i did that, the door didn't open anymore. Does anyone know how to fix this?
Hey, so first off great tutorial. After hours of struggling I could make my door work. Now I wanted to ask if someone knew how I could apply this to a double door which is supposed to only use one ProximityPromt. Thanks in advance :)
For me the door just fell idk if I did something wrong or what
Did you anchor it?
Please.... PLEASE JUST ANSWER ME WHY EVERYTIME I WATCH A SCRIPT VIDEO IT DOESNT WORK
like this is the perfect video and he did a great job
BUT nothing works for me, im gonna explode or something
EDIT: I did it
same
yo if you need help i might be able to fix it
@@Unknown-qo7kq hey man, i appreciate, but dont worry, i got it fixed. i probably should edit the comment. But thank you, a lot
HOW DID YOU FIX IT 😭
@@minyoonji2002 well, i dont remember all that much.... but i somehow fixed it :devious:
no but serious, i would just follow every step CAREFULLY.
you got this
my door is not opening
Can anyone help me, my Proximity Prompt flashes up top left whenever i test the game instead of staying on my screen when I'm in range of the door
FINALLY ONE THAT WORKS
when I try opening the door it only moves the hinge part, I did everything right so Idk what's wrong with it
DUDE THANK YOU
union can also work, thanks for this great tutorial
i followed this all the way through and it doesnt work. what do i do?????
Make sure the door is NOT anchored
Thats what was wrong with my door
If it isnt, and it still does not work, then its probably something with the weld, in the propeties make sure part0 is the door and part1 is the hinge
@@dolphinmaster420 what if it STILL doesnt work?
@@JokeAlladin idk
1) Door parts can't be anchored, make sure the hinge IS ANCHORED.
2) Install "Model Weld" owned by PixelZombieX to weld all the parts together to the hinge.
3) Insert the script, and the proximity prompt. (For multiple doors with the same script, place the ProximityPrompt under a central part of the door model)
Thank you dude!
Thanks!
Tysm!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Plz help me I am trying to make a detailed door and I want to use e to open also but idk why my detailed door won’t even work it’s says E interact, it doesn’t even say E Open
How do I make the door play sounds?
This still works rn (2024) if u follow the steps properly. If the hinge only moving but not the door, make sure to NOT ANCHOR the door.
the door isnt anchored but still doesnt open ;A;
@@TopHatDeveloper oof :[
@@Bounceleenaforevah i even tried a different one which worked the first time
But when i resizd it rotated it or moved it
It only mived some of it
And not even the main part😭
well it worked sorta it opens not correctly it opens up and down
I dont know why but i cant do it for some resson it just dosent open? is there a way to fix it
followed it step by step, and the door wont open
Make sure that anything in the door is not welded to the baseplate, should work
Make sure the door is NOT anchored
Thats what happened to me
@@dolphinmaster420stil didn’t work
when i duplicate a door it goes on top of it, do u know why?
hey bro how do i make the sound effects play when i open and close the door?
You can add sound in the door, not played not looped. Just the sound with your sound effect. Then you can add this script:
local pprompt = script.Parent.Door.ProximityPrompt ---- this is your ProximityPrompt
local sound = script.Parent.Door.YourSoundEffect ---- This is your Sound
pprompt.Triggered:Connect(function()
Sound:Play()
end)
I hope it helped
@@mskfrede228 thx
@@MTMERRIK2012 Your welcome!
Thank you
what if my door has a lot of parts?
IT WORKS
but but Please I want to make an arch door😭
thanks man
This doesn't work for me.
This doesn't cause lag cuz too much scripts in each door in my game?
This was so helpfull thank you! I tried to add door handle I made but when I try grouping the handle and the door the handle doesn't move with the door.
I think u have to Union it
How the HELL do I make a sliding money safe door that's small but big enough for the character to grab stuff from. there are Literally no tutorials..
Im making a game called "Highpoint Prison" how do i make it where only certain teams can open the door
their isnt the script in the description
my door keeps falling apart :(
anchor it
its not working
Fucking yapping my adhd cant handle this shit
The hinge moved but the door didn’t
Same for me
idk if u want the solution to this since it been 7 months BUTTT i removed all of the welds for door 1 and it worked. dont remove weld constraint tho.
@@Yiisopii ^^^
im using this video but for a fridge door and its not working.
how to delete interface?
omg the script link doesn't even work ugh
can you write the script for me plzzz?
How can you add a sound?
So you add a script on prox and make a local script/script and then add the sound on the script so when you press it the sound plays :) I just used my brain for it. Because I'm working on a horror game.
How do i add more pieces to the door?
union it
so, the door didnt move but the hinge did. what do i do
Same
i think you mightve done the weld thing wrong
What’s the script Hwo do I do it
link is in the description!
didnt work for me :(
How to make it open in an opposite way?
Nvm I figured it out, you rotate the door on a different axis
it doesn't work
doesn't work pls help
does it's work for R6?
-_-
are you of have the big dum dum
this did not work at all
IT NOT WORK
bro it does not work make a model
🙄
it no work
can someone help? my door just falls apart
Did you anchor it?
bro 69 like's
WWWWWWW
didnit work
It didnt work fro me :(
Same:(
WHAT DO YOU MEAN YOU LIAR IT DOSENT OPEN
you did the tutorial wrong
If the door opens the wrong way (happened to me) try this script and it should open the right way:
local TweenService = game:GetService("TweenService")
local hinge = script.Parent.Hinge
local prompt = script.Parent.Door.ProximityPrompt
local goalOpen = {}
goalOpen.CFrame = hinge.CFrame * CFrame.Angles(90, math.rad(0), 0)
local goalClose = {}
goalClose.CFrame = hinge.CFrame * CFrame.Angles(0, 0, 0)
local tweenInfo = TweenInfo.new(1)
local tweenOpen = TweenService:Create(hinge, tweenInfo, goalOpen)
local tweenClose = TweenService:Create(hinge, tweenInfo, goalClose)
prompt.Triggered:Connect(function()
if prompt.ActionText == "Close" then
tweenClose:Play()
prompt.ActionText = "Open"
else
tweenOpen:Play()
prompt.ActionText = "Close"
end
end)
-----------------------------------------------------------------
What I did here was change the 90 to the left, because my door wasn't working right so I changed it like that and done, guys if the door just don't open, the try to see if any part that does not go with the door is connected with the door or the door connected with any part via a weld
Mine won’t open :(
@@haveagreatday6822 See if any part that does not goes with the door is connected with the door or the door connected with any part via a weld
doesnt work this is cap