How To Make An E To Open Door In Roblox Studio (Easy & Quick)
ฝัง
- เผยแพร่เมื่อ 16 ก.ย. 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!!!!!!!!!!!!!!!!!
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
TYSM BRO!! THIS HELPED A LOT!!
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 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
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
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
this is a local script. in a multiplayer game it doesnt open for anyone else
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
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
(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)
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?
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
For me the door just fell idk if I did something wrong or what
Did you anchor it?
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)
when I try opening the door it only moves the hinge part, I did everything right so Idk what's wrong with it
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 😭😭😭😭
Try this way no anchor and Change weld position
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
thank you so much i will make great use with doors
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
when i duplicate a door it goes on top of it, do u know why?
I dont know why but i cant do it for some resson it just dosent open? is there a way to fix 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
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!
my door is not opening
Thaanksss!!!! I love your video
This was such a lifesaver.
How do I make the door play sounds?
Fun fact, With 'your' code I had a bug that helped me
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 :)
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😭
THANK YOU FIRST ONE THAT WORKS
the description 🤣
This doesn't cause lag cuz too much scripts in each door in my game?
DUDE THANK YOU
ik this tutorial old as hell but it works
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
Thanks!
FINALLY ONE THAT WORKS
well it worked sorta it opens not correctly it opens up and down
what if my door has a lot of parts?
Im making a game called "Highpoint Prison" how do i make it where only certain teams can open the door
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
union can also work, thanks for this great tutorial
Thank you dude!
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..
their isnt the script in the description
This doesn't work for me.
Tysm!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
its not working
but but Please I want to make an arch door😭
how to delete interface?
Thank you
How do i add more pieces to the door?
union it
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 ^^^
IT WORKS
thanks man
omg the script link doesn't even work ugh
so, the door didnt move but the hinge did. what do i do
Same
i think you mightve done the weld thing wrong
im using this video but for a fridge door and its not working.
What’s the script Hwo do I do it
link is in the description!
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.
can you write the script for me plzzz?
How to make it open in an opposite way?
Nvm I figured it out, you rotate the door on a different axis
Fucking yapping my adhd cant handle this shit
does it's work for R6?
-_-
are you of have the big dum dum
didnt work for me :(
doesn't work pls help
it doesn't work
Where is the script😡
can someone help? my door just falls apart
Did you anchor it?
this did not work at all
IT NOT WORK
it no work
my door keeps falling apart :(
anchor it
bro it does not work make a model
🙄
WWWWWWW
It didnt work fro me :(
Same:(
bro 69 like's
didnit work
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