E to Open Door | Proximity Prompt | Roblox Scripting Tutorial

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 996

  • @CyberCreator
    @CyberCreator  3 роки тому +47

    Like the video if this helped you out! Also at 3:13 I meant to say you could use local prompt = script.Parent.Door.ProximityPrompt

    • @T0phat1
      @T0phat1 3 роки тому +4

      hi

    • @vaishalipatil6879
      @vaishalipatil6879 3 роки тому +3

      I m having a problem. When I go to the beta features, I can't see the proximity promt there. Did this problem happened to you?

    • @CyberCreator
      @CyberCreator  3 роки тому +2

      @@vaishalipatil6879 ProximityPrompts are no longer in beta so you don't need to enable it. You should be able to add them by default

    • @justinkianaalfredo6843
      @justinkianaalfredo6843 3 роки тому

      it dosen't help me
      the proximity prompt in beta feautures is deleted, i can't use it anymore, maybe if i have the oldest version i could use it

    • @CyberCreator
      @CyberCreator  3 роки тому +1

      @justin kiana alfredo the proximity prompt is deleted from beta features because it isn't in beta. Everyone can use it by default

  • @pizzaromaneasca6826
    @pizzaromaneasca6826 2 роки тому +141

    script:
    local TweenService = game:GetService("TweenService") -- smooth animation
    local hinge = script.Parent.Hinge
    local prompt = script.Parent.Door.ProximityPrompt
    local goalOpen = {}
    goalOpen.CFrame = hinge.CFrame * CFrame.Angles(0, math.rad(90), 0) --getting current hinge CFrame and multiplying it so that it rotates it by 90 degrees. Converted to radians
    local goalClose = {}
    goalClose.CFrame = hinge.CFrame * CFrame.Angles(0, 0, 0) --does the same thing but closes the door now
    local tweenInfo = TweenInfo.new(1) --takes one second for the tween to open and close
    local tweenOpen = TweenService:Create(hinge, tweenInfo, goalOpen) --we want to tween/rotate the hinge
    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)

    • @senortele1155
      @senortele1155 2 роки тому

      Thanks :)

    • @iMeica
      @iMeica Рік тому +1

      bro thank you so much

    • @scottbenigno738
      @scottbenigno738 Рік тому

      ay thanks man

    • @byetothischannel
      @byetothischannel Рік тому

      literal god

    • @nokia9233
      @nokia9233 Рік тому +8

      I had a problem with this one where my door opened upwards instead of side to side, so I fixed it.
      Here it is:
      local TweenService = game:GetService("TweenService")
      local hinge = script.Parent.Hinge
      local prompt = script.Parent.Door.ProximityPrompt
      local goalOpen = {}
      goalOpen.CFrame = hinge.CFrame * CFrame.Angles(math.rad(90), 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)

  • @panzerlite8108
    @panzerlite8108 3 роки тому +139

    It's been 7 years since I touched roblox studio. This really helps!

  • @roguergamer8461
    @roguergamer8461 Рік тому +44

    Bro, when you put the explanation of each command you're writing on the script, it just makes the video perfect. You won a sub

  • @ScrimZU
    @ScrimZU Рік тому +72

    Protip: The door has to be unanchored. The Side, hinge, and everything else you added should be anchored, except the door with the proximityprompt.
    Also, if ur adding a handle, add a weldconstraint from door handle to the door, also make sure that’s also not anchored.

  • @jihyeonuu
    @jihyeonuu 3 роки тому +26

    Can't believe I didn't find out about this until now. This helps so much, thank you!

  • @-aquatheweirdo-1234
    @-aquatheweirdo-1234 Рік тому +5

    hi i have a problem so- when i press e the door doesnt open or the button doesnt say close what do i do?

  • @alcetrose4532
    @alcetrose4532 3 роки тому +8

    So, I did all the steps that you did, and I even double-checked. But when I press "E", it doesn't open. Why is this?

  • @KF1-crew
    @KF1-crew 4 місяці тому +1

    This helped me so much and i added a script to it where specific players can only open it.

  • @arromarches
    @arromarches 2 роки тому +6

    You don't understand how proud I was when that door actually opened lol

  • @vanny8136
    @vanny8136 2 роки тому +18

    thank you very much!! I've been trying to look for tutorials on how to make a door open using the prompt but none of them i found used tweens. and instead of just taking a link from the description, i learned from you. and luckily got this to work first try

  • @solarflames6490
    @solarflames6490 2 роки тому +16

    To anyone watching this!!! TO MAKE IT WORK download the model in the description. This is a good tutorial but to us noob scripters it is easy to get lost. With that being said refer to the model when copying the script as it is different (also easier to read lol) than the script in the video! Once again thank you Cyber!! :D

    • @eoo403
      @eoo403 2 роки тому

      no, you shouldnt rely on other things and actually learn. if you cant do it then try harder. this comment is bullshit

    • @levip.8961
      @levip.8961 2 роки тому +1

      @@eoo403 It's just a video on how to make a door for people who don't know how to script.

    • @eoo403
      @eoo403 2 роки тому

      @@levip.8961 im talking about the original comment, dont use the model and actually learn whats going on.

  • @Skedoink
    @Skedoink 3 роки тому +29

    Your videos are so underrated keep doing what your doing dude its helping a lot of people.

  • @heypikachu276
    @heypikachu276 3 роки тому +3

    So I was gonna comment my issue with it, but then I realized "Oh wait. Prompts have a Line of Sight option. Since it's spawning inside my door, maybe that's the issue?" I've worked at this with hitboxes, and solved it by clicking one button. I wouldn't have made it nearly that far if I didn't have the door base. Thanks!

  • @UhYeahUhmThisIsAwkward
    @UhYeahUhmThisIsAwkward Рік тому +3

    Wow,first i had no clue,but now i released a roblox game with the help of your tutorials.Thank you so much! your tutorials always help sm❤

  • @Basmoyy
    @Basmoyy Рік тому +10

    If you want to add door nobs to your door, I recommend you to wield the base into the door nobs so they can stay connected and follow the base of the door when your opening them

  • @raphaelrakaraditya
    @raphaelrakaraditya 3 роки тому +8

    yes finally i found great tutorial after 4 months

  • @horrifiedski9374
    @horrifiedski9374 Рік тому +10

    Anyone doing the fancy door script here you go:
    local TweenService = game:GetService("TweenService")
    local hinge = script.Parent.Doorframe.Hinge
    local prompt = script.Parent.Base.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)

  • @midnightdragon4712
    @midnightdragon4712 2 місяці тому +1

    ok i did this and the e to open button appears now but it doesn’t actually open 😭😭😭 help :,) anyone know what i might’ve done wrong?

  • @its_qez4480
    @its_qez4480 3 роки тому +5

    TYSM! This is perfect for my robber game. I will change the door to a vault :D

    • @CyberCreator
      @CyberCreator  3 роки тому

      Good idea! Glad I could help!

    • @BeliauFaux
      @BeliauFaux 3 роки тому

      what game is it, i want to try it, sounds fun

  • @cookiepuf4661
    @cookiepuf4661 2 роки тому +2

    The door is not opening it says E Open but it doesn’t actually open

  • @Feztek626
    @Feztek626 2 роки тому +4

    When I press e the thing that says how to open the door disappears for a second but comes back and the door does nothing.

  • @JustAnObjectShowFan
    @JustAnObjectShowFan Місяць тому

    If the door doesn't seem to move but the hinge does, make the door unanchored (hinge anchored) and make sure that the door is part1 in the weld and the hinge is part0

  • @prod.nine88
    @prod.nine88 3 роки тому +11

    Is there a way to make it so you need a key for it to open?
    I'm new to scripting so I kinda need help lol

  • @nash1461
    @nash1461 2 роки тому +1

    4 years ago I made a Roblox game we’re you have to survive a round that has a creepypasta (like Jeff the killer, slender man ect.) and I want to remake it so this helps a ton, thanks!

  • @shockz5681
    @shockz5681 Рік тому +2

    If your door is opening upside down use this script. It only changes one thing
    script:
    local TweenService = game:GetService("TweenService") -- smooth animation
    local hinge = script.Parent.Hinge
    local prompt = script.Parent.Door.ProximityPrompt
    local goalOpen = {}
    goalOpen.CFrame = hinge.CFrame * CFrame.Angles(math.rad(270), 0, 0) --getting current hinge CFrame and multiplying it so that it rotates it by 90 degrees. Converted to radians
    local goalClose = {}
    goalClose.CFrame = hinge.CFrame * CFrame.Angles(0, 0, 0) --does the same thing but closes the door now
    local tweenInfo = TweenInfo.new(1) --takes one second for the tween to open and close
    local tweenOpen = TweenService:Create(hinge, tweenInfo, goalOpen) --we want to tween/rotate the hinge
    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)

    • @crazydog4626
      @crazydog4626 4 місяці тому

      what if the button to open the door only appears at when you're spawining so it it doesn't let you open the door when you are in the game

  • @MarcioSilva-iz3yn
    @MarcioSilva-iz3yn Рік тому +7

    Guys remember to disable the "Join Surfaces" in Model tab to you dont have any welds at the door. Otherwise, the door will not move

    • @MariusSirr
      @MariusSirr Рік тому +1

      This worked

    • @Blebo96
      @Blebo96 11 місяців тому

      how?

    • @Blebo96
      @Blebo96 11 місяців тому

      pls tell

    • @sinj6tsu
      @sinj6tsu Місяць тому

      @@Blebo96 under the Mode: Geometric thingy

  • @gorgiliyan135
    @gorgiliyan135 7 місяців тому +1

    It doesn't work for me. I did everything I could to make it work but it didn't work. Can you please help me

  • @alxmin4932
    @alxmin4932 3 роки тому +44

    Great video. Well explained and easy to follow along. Thanks for the helpful videos!

    • @CyberCreator
      @CyberCreator  3 роки тому +5

      Thank you for the kind words!

    • @I_heart_jw
      @I_heart_jw 2 роки тому +2

      i did everything but didn't work with me i wanna know why

    • @moltendog8497
      @moltendog8497 2 роки тому +1

      @@I_heart_jw Same

    • @I_heart_jw
      @I_heart_jw 2 роки тому

      @@moltendog8497 @maqua I think because of an update or something

    • @spoolful
      @spoolful 2 роки тому +2

      @@I_heart_jw no, prob u got same error than me (but i fixed it, very bruh error)
      - Hinge part anchored
      - Door part not anchored
      if works for you let me know

  • @crazydog4626
    @crazydog4626 4 місяці тому +1

    it doesn't work for me the "e" to open door just doesn't appear, and I rechecked the video several times and I did everything correctly several times and it still didn't work?

    • @crazydog4626
      @crazydog4626 4 місяці тому

      it DOES work, but the button to open it only appears for a slights second for some reason so it doesnt let me open it anyways. Please update this tutorial it doesn't work in 2024

  • @IntercodeStudios
    @IntercodeStudios Рік тому +5

    This man, explained everything extremely well. Made this entire tutorial very easy to listen too, and pay attention too. You put the explanation of every command used in the script, on screen, so we could understand what it was doing in the script, and also put the model in the description. Absolutely amazing. Earned a sub for sure.

  • @NahItsXavi
    @NahItsXavi Рік тому +1

    Im making a door for my game but every Time i try to Open it doesn't work is there do you know a way i could fix This?

  • @Iloveyou-lo4si
    @Iloveyou-lo4si Рік тому +1

    Can somebody help me. I have my own custom door which I made and only 1 part of the door is moving when I open/close it. Can somebody tell me how to make the other parts move too!

  • @Sky_Hygh
    @Sky_Hygh 3 роки тому +3

    Your voice is so calming and you help me make a game. I hope you get 10k subs

  • @Huntaa132
    @Huntaa132 3 місяці тому +1

    can anyone help? why is my door not opening..it got the open and close button but it wouldn't swing

    • @AyaPapayaReal
      @AyaPapayaReal 2 місяці тому

      ik ijm rlly late but maybe u anchored the door only hinge needs to be anchored

  • @Clover-j3n
    @Clover-j3n 2 роки тому +4

    I dont know how but my door wont open

  • @sinj6tsu
    @sinj6tsu Місяць тому

    So, after successfully scripting the simple door, I tried to do follow the same steps for a door I had already made. It wasn't working, so I went back into the script and realized that my door had a lowercase d instead of an uppercase one (which messed up the script). After fixing this, my door now opens the other way..

  • @the_am_trader
    @the_am_trader 2 роки тому +3

    Noob here. So I started this tutorial from beginning. Made my own door. After all that, it works flawlessly. Now I wanna add a knob on my original door. How do I add it and make it stick. It keeps falling down. I noticed the 2nd door you imported has a door knob. How did you make it stay? Was it anchored? Union? Grouped? I tried the 3 of them. But didn't stay.

    • @the_am_trader
      @the_am_trader 2 роки тому +2

      NVM. Figured out. Just needed to weld the doorknob to the door.

    • @justazek
      @justazek 2 роки тому

      @@the_am_trader I’m having the same issue, how did you do that?

  • @thepolarpals
    @thepolarpals 2 роки тому +12

    I had to do quite a bit of tinkering to make it work in 2022 but I would of never got it done without this tutorial. Thank You so much!
    If anyone else is trying to get it to work and they want to see what I did I'd be happy to show them.

    • @Fazbear_Entertainment_LLC
      @Fazbear_Entertainment_LLC 2 роки тому +2

      can you please show me it doesnt work for me

    • @ozzi9661
      @ozzi9661 2 роки тому

      literally how

    • @BorgorMyth
      @BorgorMyth 2 роки тому

      please do!

    • @thepolarpals
      @thepolarpals 2 роки тому

      Sorry guys but my computer isn’t functioning at the moment. I’ll send what I did as soon as I can.

    • @ozzi9661
      @ozzi9661 2 роки тому

      @@thepolarpals alr

  • @npcczip
    @npcczip 3 місяці тому +1

    I know this is from three years ago, but say i wanted to make this like a click to open instead of e to open, how would I do that? i haven't really found any good tutorials on it yet

    • @cronus_ampora_totalwizarddeath
      @cronus_ampora_totalwizarddeath 3 місяці тому +1

      Just get a input a click detector instead of a proximity prompt and replace any mentions of proximity prompt in the script with click detector.

  • @DouglasSquiggly
    @DouglasSquiggly Рік тому +8

    If the door is turning the wrong way, instead of it turning 90, make it turn -90

    • @velocitydam5090
      @velocitydam5090 Рік тому

      turns the other way howver u have told people the line which as a problem ty

  • @nebz-fr
    @nebz-fr 3 дні тому +1

    hey i just started learning how to script but theres one thing i can get down, i have a door made of multiple mesh parts but no scripts or anything, i welded all the parts together so its like a model but i can seem to script in it

  • @betrayedpickle291
    @betrayedpickle291 3 роки тому +3

    great vid as always cy!

  • @rainbowV69
    @rainbowV69 2 роки тому +4

    How do add door opening sounds effects to the doors?

  • @BiggestJimmyBiscuit
    @BiggestJimmyBiscuit 2 роки тому +1

    For some reason it doesn’t work and it said script :7: Expected identifier when parsing expression, got )

  • @teomanmoon118
    @teomanmoon118 2 роки тому +10

    Amazing Tutorial! Explains everything very well and is easy to use in any project due to soft-coding.

  • @Giyu123
    @Giyu123 7 місяців тому +1

    To all the people saying it doesnt work
    Change
    Local door = script.Parent.Door
    Local hinge = script.Parent.Hinge
    To
    Local door = game.Workspace.Door
    Local hinge = game.Workspace.Hinge

  • @AllPurposeGaming
    @AllPurposeGaming 2 роки тому +28

    How about a system like escape the darkness has where you have to do three different tasks. Two sets each. Like start the generators, grab notes, and find the exit door buttons. That would be a big help

    • @LetGoMyLegosTyler
      @LetGoMyLegosTyler 2 роки тому +2

      isn't that among us

    • @galenpanna622
      @galenpanna622 2 роки тому +4

      @@LetGoMyLegosTyler no it is dead by daylight

    • @onlinepredator8544
      @onlinepredator8544 2 роки тому +9

      buddy learn how to script if u wanna do something like that, dont beg other people for free scripts.

  • @c_syd
    @c_syd 2 роки тому +1

    mine isn't working for some reason. i followed the tutorial, and even downloaded the model to check the scripts. exactly the same, except with the names of my objects. i don't know what i did wrong. the tween works just fine. but i can't test if it works with the proximity prompt... because the prompt is invisible. i walk up and it's not there. it doesn't pop up. nothing happens if i press E.

  • @fuxew2
    @fuxew2 Рік тому +36

    Thank you, it doesn't work 👍

    • @merryjane3018
      @merryjane3018 4 місяці тому +3

      Bro it Works If you understand

    • @lightningboltzlegacy7608
      @lightningboltzlegacy7608 4 місяці тому +2

      Check your scripts and compare it to this video to see what went wrong and retrace your steps

    • @Bing8224.
      @Bing8224. 3 місяці тому +9

      make sure its not anchored

    • @AloneWorld_7024
      @AloneWorld_7024 3 місяці тому

      Bro no one understands that's why we're on this videos ​@@merryjane3018

    • @qburtgamez7548
      @qburtgamez7548 2 місяці тому +2

      Same I did everything right my output did not see anything wrong and so viewed my mistakes corrected them multiple times and it didn’t work
      I’ve had issues like this with many different scripts where it just would not work
      They were all on different games tho
      Is there a setting I need to enable for scripts to work?
      I am also on a team create game so is it something with that?

  • @oskarcatss
    @oskarcatss 2 роки тому +1

    do i need to weld all the parts of the door and then weld it to the hinge? because it doesnt let me select the whole model (i made my own door btw)

    • @zacsen765
      @zacsen765 Рік тому

      i did the same plz tell me u got a awnser

  • @Tinpotic
    @Tinpotic 10 місяців тому +5

    !!FOR ANYONE WHO NEEDS HELP BECAUSE IT DOESN'T WORK!!
    hi
    don't put the script in the door block
    instead, have it within the grouped set of blocks
    (The Parent of the Script should not be the door, but rather the group/model the door part is in)

    • @imscrate
      @imscrate 8 місяців тому

      Didn't really make sense to me..

    • @Tinpotic
      @Tinpotic 8 місяців тому

      @@imscrate ok so
      have 2 parts
      one as the hinge and the other as the door
      make sure they are all named correctly
      group all parts as a model
      insert the script INTO the model (so that the model is the parent)
      do NOT put it into one of the parts!!!!
      ok there

    • @imscrate
      @imscrate 8 місяців тому

      @@Tinpotic I see! Thank you very much

    • @crazydog4626
      @crazydog4626 4 місяці тому

      it still doesnt work

  • @SpiderPeanutbutter
    @SpiderPeanutbutter Рік тому +2

    if you're trying to make a double door just go into the script find 90 and make it -90 for the opposite door😭yw

  • @itsyaboiwafflezz3210
    @itsyaboiwafflezz3210 3 роки тому +3

    For some reason it doesnt work even though I did the exact same as you
    Edit: Ok I got your free model to see what I did wrong, but when I test it to see if it works it doesnt open either

    • @kuprk9369
      @kuprk9369 3 роки тому +1

      i have the same issue but the "more detailed door" works so i dont know

    • @CyberCreator
      @CyberCreator  3 роки тому

      I forgot to undo a change I made to the script right before I uploaded it! Try again now!

    • @CyberCreator
      @CyberCreator  3 роки тому

      @kuprk I forgot to undo a change I made to the script right before I uploaded it! Try again now!

    • @kuprk9369
      @kuprk9369 3 роки тому

      It works thanks

  • @redelement5634
    @redelement5634 2 місяці тому +1

    I tried it but the door will not move at all and its not anchored I did use roblox coding recommendation feature but its recommendations were literally the same on the tutorial does anyone know how to fix this?

    • @polaris2o
      @polaris2o 2 місяці тому

      I replaced the empty parentheses on local goalOpen = () to braces {} same with the goalClose and made sure the caps all lined up properly it worked for me after that

  • @Papaintion
    @Papaintion 3 роки тому +13

    Another outstanding video from my boy Cyber. I do have some questions though. When you’re rotating the CFrame of the door, why did you not just do 90 instead of math.rad(90)? Is there an explanation? What’s the meaning of Visual? How can you weld to Visual?

    • @CyberCreator
      @CyberCreator  3 роки тому +5

      Visual is just the name of a part of the door. I should have made that more clear. There's a link in the description with the model if you want to check it out.
      You have to use math.rad because the CFrame.Angles function uses radians and not degrees so we need to convert the degrees into radians. This website explains radians in more detail if you aren't familiar www.mathsisfun.com/geometry/radians.html
      I'm planning on making a video on CFrames in the future

    • @Papaintion
      @Papaintion 3 роки тому

      @@CyberCreator dude thank you! This explains 50% of my scripts that doesn’t work

    • @betrayedpickle291
      @betrayedpickle291 3 роки тому +2

      @@CyberCreator If it uses radians then why didn't we have to use math.rad() for the x and z as well, that were zeros?
      sorry i just dont know lol

    • @CyberCreator
      @CyberCreator  3 роки тому +1

      @@betrayedpickle291 fair question! math.rad(0) is actually 0. 0 degrees is also 0 radians so we gave the degrees in radians when we just used 0.

    • @betrayedpickle291
      @betrayedpickle291 3 роки тому

      @@CyberCreator i see now, thanks!

  • @Antylics
    @Antylics 11 місяців тому

    why am i getting " TweenService:Create no property named 'Cframe' for object 'Hinge' " error
    where am i suppose to put Cframe? i didnt see anything about that in the video

  • @breakingmad2645
    @breakingmad2645 3 роки тому +4

    Very awesome tutorial. I made it so it would close automatically but you can only open it again if it was closed :D

    • @CyberCreator
      @CyberCreator  3 роки тому +3

      That's great! Thanks for watching!

    • @gabrieltagonizer3720
      @gabrieltagonizer3720 2 роки тому

      Show me the code so that I can do the exact same thing.

    • @funnythe7th
      @funnythe7th Рік тому +1

      @@gabrieltagonizer3720 bro someone made it, they can decide if its open source or not. you cant just steal someones code and force them to give you it

    • @TheBaldestHero
      @TheBaldestHero 4 місяці тому

      @@gabrieltagonizer3720 bruh.

    • @lawsontroedel-jg3rb
      @lawsontroedel-jg3rb 4 місяці тому

      i might be dumb can you explain what that means lmao

  • @Quilltonic
    @Quilltonic 11 місяців тому +1

    Thank you so much for this helpful tutorial I know were you live

  • @walidmohandes5644
    @walidmohandes5644 3 роки тому +3

    Can we possibly add knock and lock/Unlock too?

  • @xxsunflowerxx3314
    @xxsunflowerxx3314 Рік тому

    do youknow what i might have did wrong bc i did not have 2 scripts?

  • @starfox_studios
    @starfox_studios 3 роки тому +3

    bruh when you typed acion I got so mad I was like screaming "FIX IT"

  • @dianna2108
    @dianna2108 Рік тому +1

    Thank you for linking the doors in the desc! It helped me firgure out what was wrong with my script and take a closer look at all the parts :D
    You're the first youtuber dev i've watch who has even done that! I will be subscribing for sure

  • @cirogalante8823
    @cirogalante8823 3 роки тому +3

    can you make a vid of how to add like a key system or something like that
    Live you videos btw :D

    • @DTorto
      @DTorto 3 роки тому

      like, to use a different key? just go to the properties tab while selecting the proximity prompt with the explorer, and scroll down to keyboard code and change it to whatever.

  • @nathanrutherford6947
    @nathanrutherford6947 2 роки тому

    can you please tell me how to make it work for 2022 I made the code EXACTLY the same and it doesn't
    work

  • @rubybahler5409
    @rubybahler5409 2 роки тому +3

    Heres the script (some of it is tweaked by me so don't copy that!
    local TweenService = game:GetService("TweenService")
    local door = script.Parent.Union
    local goalOpen = {}
    goalOpen.CFrame = Union.CFrame * CFrame.Angles(0, math.rad(90), 0)
    local goalOpen = {}
    goalOpen.CFrame = Union.CFrame * CFrame.Angles(0, 0, 0)
    local tweenInfo = TweenInfo.new(1)
    local tweenOpen = TweenService:Create(Union, tweenInfo, goalOpen)
    local tweenOpen = TweenService:Create(Union, tweenInfo, goalClose)
    prompt.Triggered:Connect(function()
    If prompt.ActionText == "Close" then
    tweenClose:Play()
    Prompt.ActionText = "Open"
    else
    tweenOpen:Play()
    prompt.ActionText = "Close"
    end
    end)

    • @zeroidentityzyzyzy
      @zeroidentityzyzyzy 2 роки тому

      thank you so much cybercreator doesnt give a shit about how long it takes to type this script

    • @0skillgamer
      @0skillgamer 2 роки тому

      @@zeroidentityzyzyzy ?

    • @zeroidentityzyzyzy
      @zeroidentityzyzyzy 2 роки тому

      @@0skillgamer wdym question mark its annoying for beginners

  • @FL4WLESSGamer
    @FL4WLESSGamer 2 роки тому +25

    I DID ALL OF THIS ND IT DOESNT WORK!!!

    • @A-37AndA-39
      @A-37AndA-39 10 місяців тому +1

      Mine is broken too IT SAYS THE TWEE SERVICE IS NOT A VALID SERVICE NAME

    • @MicrowesoftEdge
      @MicrowesoftEdge 10 місяців тому

      ​@@A-37AndA-39tween*

    • @TheRealElliboy
      @TheRealElliboy 9 місяців тому

      @@MicrowesoftEdgeyeah..

    • @SansUnderpants420
      @SansUnderpants420 8 місяців тому +2

      womp womp (just a joke i cant resist)

    • @TwistedDestiny12
      @TwistedDestiny12 8 місяців тому +2

      I got mine to work. But i didn't wryie the script. I went to the description, and i found the link to the model imported the model and used the script on another door.

  • @etl3nne
    @etl3nne 5 місяців тому +1

    How do i make it that WHEN the door is opening, it can be passed through since its pretty annoying right now hitting it and stuff!

    • @unusualakay
      @unusualakay 3 місяці тому

      the tween fires a tween.completed trigger (same as the proximity trigger) when its done playing, so you can just have the collide of the door turn off when the tween is started, and turn back on using
      tween.completed:connect(function()
      )

  • @duckywashere684
    @duckywashere684 3 роки тому +6

    can you make a E to open door, but with a keycard? and make it slide instead of setting it on a hench

  • @Error-qy1kl
    @Error-qy1kl 2 роки тому +2

    It is giving me an error saying: TweenService:Create no property named 'Cframe' for object 'Hinge'.
    What do I do? D:

    • @RealDDZS
      @RealDDZS 2 роки тому

      Write CFrame not Cframe

  • @samuelkh8689
    @samuelkh8689 9 місяців тому

    why it doesn't work? i already try it for a month but still no results...

  • @toomashuaa2175
    @toomashuaa2175 11 місяців тому +1

    I LITERALLY DONT KNOW WHATS WRONG BUT IT JUST REFUSES TO WORK WHAT?????? NO ERROR MESSAGE NO NOTHING IT JUST DOESNT WORK

  • @_40KVV
    @_40KVV 2 роки тому +1

    i have the script completely correct, however, when i go to test it nothing happens. the key " E " is shown but once pressed nothing changed. help?

  • @Flex_plosion
    @Flex_plosion 2 роки тому +1

    Only my hinge moves. Does anyone know how to fix it?

  • @MersonON
    @MersonON Рік тому

    I want to make a script with door cooldown
    I mean I want to open the door and when it pass 10 secounds it automatically close down
    Could somebody help me

  • @Sulman8k
    @Sulman8k Рік тому +1

    When welding I don't see the "create" option, I play on laptop so maybe that's why.

    • @gocrucial
      @gocrucial Рік тому

      SAME

    • @YorktownClass
      @YorktownClass Рік тому

      it's because roblox studio got updated. Also roblox studio isn't different from device to device

  • @cashewplayz
    @cashewplayz 2 роки тому

    i have a problem when i try to open door it doesnt work and it says something wrong with line 8

  • @ruptbolt8032
    @ruptbolt8032 3 роки тому +2

    I tried but my door went flying somewhere else

  • @SlushyAlpha
    @SlushyAlpha Рік тому

    so it work for me but i need that to make a truck door so the door need to not be anchor but when i unachor it it stop working.

  • @CatMagglio
    @CatMagglio 2 роки тому +2

    For some reason after it's opened, I don't get an option to close it again. I did configure it so that it only opens to 70 degrees and added a script that makes a sound play when the prompt is triggered. Do you know what the issue is?
    Edit: Fixed the issue, for some reason in my audio code I made it so the trigger distance would be set to zero after the script played the noise. Oops!

    • @carat9023
      @carat9023 2 роки тому

      I can't get the door to swing open, could you help?

    • @CatMagglio
      @CatMagglio 2 роки тому

      @@carat9023 did you add any additional scripts or parts to the model? Is the door part that’s connected to the hinge anchored?

    • @carat9023
      @carat9023 2 роки тому

      @@CatMagglio It is anchored, and I don't think I added any extra scripts or parts, I have no idea whats wrong

  • @typicalteo9583
    @typicalteo9583 2 роки тому

    Thanks! I needed this for a roleplay game I am Creating! Great Video, I subscribed.

  • @Killerthekingofhell
    @Killerthekingofhell Рік тому

    Hey, me and my friend is trying to use this but the door itself just falls off when we put it on something

  • @fuxew2
    @fuxew2 Рік тому +1

    The script is
    local TweenService = game:GetService("TweenService")
    local door = script.Parent.Door
    local hinge = script.Parent.Hinge
    local prompt = door.ProximityPrompt
    local goalOpen = {}
    goalOpen.CFrame = hinge.CFrame = hinge.CFrame * CFrame.Angles(0, math.rad(90), 0)
    local goalClose = {}
    goalClose.CFrame = hinge.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)
    You're welcome

    • @fuxew2
      @fuxew2 Рік тому

      Also i wasted 20 minutes for it to not work

    • @YorktownClass
      @YorktownClass Рік тому

      @@fuxew2 learn tweenservice bro

  • @bulbs_
    @bulbs_ 2 роки тому +1

    I wrote the script and it didn't work. Can u please put the script in the description?

  • @andow-i9p
    @andow-i9p Рік тому +1

    when I did the script it says open door but it doesn't open?

  • @Tetramino21
    @Tetramino21 2 роки тому

    How do i make a door that doesnt have rotating stuff but only like lets say the closed part is visible the open is transparent and it switches when pressed E?

  • @supercow3647
    @supercow3647 2 роки тому

    just me or is there a red line under prompt whenever you write it? can someone please explain why this is happening?

  • @rahbi-bi7ei
    @rahbi-bi7ei 3 роки тому

    Do you have to anchor the door or no cause I put the script but the door just falls down I will see if other videos you made work

  • @kurdmajid4874
    @kurdmajid4874 Рік тому

    dude i always watch your vids for tutorials tysm.

  • @xelalexa3262
    @xelalexa3262 Рік тому

    WHERE DID THE PROXIMITY PROMPT THING APPEAR I CANT FIND IT

  • @Gojo_edit.
    @Gojo_edit. 2 місяці тому

    thank you so much, the tutorial helped me with a problem last for 1 hour :) 🙏🙏

  • @extramangos2578
    @extramangos2578 Рік тому +2

    If you door still isn’t working. Make sure everything but the frame and hinge is unanchored. If it still doesn’t work make sure the welds are both active and enabled.

  • @Flamextreme03
    @Flamextreme03 4 місяці тому

    Thanks dude, it totally works! Tyvm! You will be the one to go to when I need RB Studio help!

  • @dom.swiftie
    @dom.swiftie Місяць тому

    how could you do a double door? (so that both sides open from one proximity prompt)

  • @Ackhroo
    @Ackhroo 2 роки тому

    The door works but after i put it in a model it breaks (the prom after pressing it the door doesnt move) any help?

  • @ellielouise5053
    @ellielouise5053 2 роки тому

    it isnt working for me, is there anyway u can copy the first script and paste it in response to this comment? im sure ive gotten everything right so its confusing that its not working for me. i did notice though, that lines 7 & 10 have red lines under the brackets at the end, i have no idea how to sort that out, i would love help, thank you! (also i do not have discord so i cannot communicate through there for help)

  • @DDFandomProtectors1
    @DDFandomProtectors1 8 місяців тому

    Is there a way i can add a claim house prompt into the door part within it's script before it gives the ability to do the E to open door prompt?

  • @epicgamerboy569
    @epicgamerboy569 2 роки тому

    The script isnt working :( i spent an hour on this and it doesnt even work

  • @lowqualityfrog
    @lowqualityfrog Рік тому

    I got it to open but it won't close, I checked the script like, five times. Is there any solution?

  • @rjminecrafter1148
    @rjminecrafter1148 Рік тому

    Nevermind it was confusing for a bit but i got my script to work! Thank you very much!