How to Make a Working Door in Roblox Studio!

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024
  • In this video I will be showing you how to make a working door in roblox studio so that you can use it for your very own roblox game where you would need to use doors and to make your roblox game even better.
    How to Make a Working Door in Roblox Studio!
    ✅ SUBSCRIBE HERE! ➜ / @devmelonroblox
    🔔 Be sure to hit the bell to turn on notifications!
    👍 Be sure to hit that like button!
    How to Make a Working Door in Roblox Studio!
    #roblox​​ #robloxscripting #robloxstudio #door
    🎮 What is Roblox? 🎮
    ROBLOX is an online virtual playground and workshop, where kids of all ages can safely interact, create, have fun, and learn. It’s unique in that practically everything on ROBLOX is designed and constructed by members of the community. ROBLOX is designed for 13 to 18 year olds, but it is open to people of all ages. Each player starts by choosing an avatar and giving it an identity. They can then explore ROBLOX - interacting with others by chatting, playing games, or collaborating on creative projects. Each player is also given their own piece of undeveloped real estate along with a virtual toolbox with which to design and build anything - be it a navigable skyscraper, a working helicopter, a giant pinball machine, a multiplayer “Capture the Flag” game or some other, yet-to-be-dreamed-up creation. There is no cost for this first plot of virtual land. By participating and by building cool stuff, ROBLOX members can earn specialty badges as well as ROBLOX dollars (“Robux”). In turn, they can shop the online catalog to purchase avatar clothing and accessories as well as premium building materials, interactive components, and working mechanisms.
    How to Make a Working Door in Roblox Studio!

Комментарии • 355

  • @devmelonroblox
    @devmelonroblox  Год назад +8

    Thanks for watching! Make sure to like and subscribe to see more tutorials like these!

    • @lalalaitsetr8633
      @lalalaitsetr8633 Год назад

      can you put the code in the discription

    • @devmelonroblox
      @devmelonroblox  Год назад

      Yes of course next video I will do this!

    • @lalalaitsetr8633
      @lalalaitsetr8633 Год назад +1

      why when i click the door nothing happens

    • @bobthebox8799
      @bobthebox8799 Год назад

      For some reason the hinge moves instead of the Door. I’ve checked everything over and over again any idea what the problem is

    • @lalalaitsetr8633
      @lalalaitsetr8633 Год назад

      @@bobthebox8799 i have a problem too when i click at the door the door just falls

  • @AlanSosa
    @AlanSosa 10 месяцев назад +26

    For those like me who do not have much experience and want the door to work (since it is likely that on the first try only the hinge part will work) you should only un-anchored the door, now if you need a more detailed door to work replicate the weldcontraint in all the parts you added (works with meshes) and un-anchored each part
    It will take some time but the result is worth it :)

    • @AverageBinn
      @AverageBinn 10 месяцев назад +2

      15hours ago you commented this. Im a lucky mf you fixed my issue thanks. (unanchoring door) @AlanSosa

    • @AlanSosa
      @AlanSosa 10 месяцев назад

      Ur welcome body!@@AverageBinn

    • @Melody_Itzanew
      @Melody_Itzanew 8 месяцев назад +1

      Thank you SOOOO much, my was so close to throwing my computer 😭

    • @AlanSosa
      @AlanSosa 8 месяцев назад

      @@Melody_Itzanew lmao me too at the first try

    • @claire5727
      @claire5727 5 месяцев назад

      I have a more detailed door and when I unanchor everything the door is just lying on the ground in the individual pieces. Is there anything I can do to try to fix it? my setup rn is pretty messed up tho since I started doing all of this yesterday 😭
      for more context, I got my door from the toolbox since I don't really know how to make a good door yet, and all the pieces are a union, not a part. I added the weld constraints to all of them but it's still not working :(

  • @lucidhydra2446
    @lucidhydra2446 Год назад +17

    for those wondering why the hinge is the only thing moving after scripting don't forget to un-anchor the door part in the door model under the explorer tab, then try it

    • @devmelonroblox
      @devmelonroblox  Год назад

      Nice!

    • @lucidhydra2446
      @lucidhydra2446 Год назад +1

      @@devmelonroblox amaazing video btw, ! thanks for the video, very much helpful

    • @Mr-meme12
      @Mr-meme12 Год назад +1

      I pray down to you, thank you kind soul, for spreading your much needed knowledge

    • @dc1545
      @dc1545 Год назад

      Also, if your door still doesn't work then you probably didn't put the click detector in the door part.

    • @1210milky1
      @1210milky1 11 месяцев назад

      THANK YOU SO MUCH!!!

  • @MFEditz8712
    @MFEditz8712 6 месяцев назад +9

    Note: Don't anchor the door (not hinge)
    Cuz the door will not move

    • @CaptainL3v1
      @CaptainL3v1 5 месяцев назад +1

      tysm

    • @lwvwrrodwh
      @lwvwrrodwh 2 месяца назад +1

      THANK YOUUUUUUUUUUUUUUUUUUUUUU

    • @oneminecraftperson
      @oneminecraftperson 2 месяца назад +1

      I did not anchor the door but it isn't opening

  • @christophaebi8423
    @christophaebi8423 Год назад +9

    Thanks for this tutorial! Just a little optimization for the Hinge: Duplicate the Part an rename it to "Frame". Set the Hinge Part to transparancy "1". The frame of the door will now remain static.

  • @BelowNormality
    @BelowNormality Месяц назад +2

    at first i thought that i was getting time scammed , but then i coppied a code and it worked PERFECTLY , thank you😯(

  • @bjay_y
    @bjay_y 11 месяцев назад +7

    local TS = game:GetService("TweenService")
    local Door = script.Parent.Door
    local Hinge = script.Parent.Hinge
    local Open = false
    local openState = {}
    openState.CFrame = Hinge.CFrame * CFrame.Angles(0, math.rad(90),0)
    local closeState = {}
    closeState.CFrame = Hinge.CFrame * CFrame.Angles(0,0,0)
    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(Hinge, tweeninfo, openState)
    local CloseAnim = TS:Create(Hinge, tweeninfo, closeState)
    Door.ClickDetector.MouseClick:Connect(function()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else
    Open = false
    CloseAnim:Play()

    end
    end) HERES THE SCRIPT GUYS :DD

  • @Animblox
    @Animblox Год назад +4

    So for some reason i've been looking like actual weeks for a tutorial on how to make a door. Cause I suck at scripting. And uh this is perfect so ty!

  • @RadioactiveM0th
    @RadioactiveM0th Год назад +4

    hey i have a request, how to make an interactable paper note that appears on your screen when you click on it , and disappears from your screen when click on the image on the screen , and the same thing with a book but you can also flip the pages , and its e to exit

  • @cronus_ampora_totalwizarddeath
    @cronus_ampora_totalwizarddeath 2 месяца назад +2

    Hey devmelon, i appreciate your tutorial and I do have the thing written down bar for bar. Very cohesive, i applaud you. It does not work. My door is unanchored, my hinge is anchored theyre welded together, ie, ive met all the criteria. I have put in /console during my test run and it says "Hinge is not a valid member of Workspace "Workspace"" and "Cframe is not a valid member of Part "Workspace.gate;model.Hinge"". I dont know where i went wrong

    • @cronus_ampora_totalwizarddeath
      @cronus_ampora_totalwizarddeath 2 месяца назад +1

      Alright- my problem is line 5. It originally said local Hinge = script.Parent.Hinge, it now says local Hinge = game.Workspace.Hinge. I didn't get the other error, I think this is my problem but I don't exactly know why, because Hinge IS apart of the model.

    • @devmelonroblox
      @devmelonroblox  2 месяца назад

      @@cronus_ampora_totalwizarddeath I think you have ot place the hinge inside the doo im nt sure

  • @Mr_bouquet
    @Mr_bouquet 6 дней назад

    It worked that you so mutch 🧡

  • @arbitrarilyentertainment8553
    @arbitrarilyentertainment8553 Год назад +2

    Thanks so much dude! Im really new to coding and Im trying to learn while going along but this door thing with its tween service and the out of the blue math.rad part really struck me down lol

    • @devmelonroblox
      @devmelonroblox  Год назад

      No problem!

    • @Thekatbo
      @Thekatbo 9 месяцев назад

      can you send the script@@devmelonroblox

  • @ChainSawDollx
    @ChainSawDollx Год назад +4

    I tried this like 4 times and when I go up to the door it opens the hinge not the door and if i open it once it won’t go back

  • @mirapaskval4770
    @mirapaskval4770 Год назад +1

    This helped for my game (subed)😀

  • @azzyastrokat
    @azzyastrokat Месяц назад +2

    Got the code all typed out (since I couldn't find it in the comments) and it works great! If you want to add more details to your door, DEFINITELY make all the different parts into a union so they're all ONE part, I had issues with this but got it to work.
    local TS = game:GetService("TweenService")
    local door = script.Parent.door
    local hinge = script.Parent.hinge
    local Open = false
    local openState = {}
    openState.CFrame = hinge.CFrame * CFrame.Angles(0, math.rad(90),0)
    local closeState = {}
    closeState.CFrame = hinge.CFrame * CFrame.Angles(0,0,0)
    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(hinge, tweeninfo, openState)
    local CloseAnim = TS:Create(hinge, tweeninfo, closeState)
    door.ClickDetector.MouseClick:Connect(function()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else Open = false
    CloseAnim:Play()
    end
    end)

  • @foozywolf
    @foozywolf Год назад +5

    i build a whole house while i was in play so when i went out of play everything was gone... 1 hour wasted ..
    nice tutorial tho, i will try it again and this time wont build in play xD

  • @cistroo
    @cistroo 3 месяца назад +3

    when I click to the door nothing happens can tell me how can I fix it

    • @DanR1skDeah2Risk
      @DanR1skDeah2Risk Месяц назад +1

      Anchor the hinge but not the door

    • @Smiley_69420
      @Smiley_69420 14 дней назад

      @@DanR1skDeah2Risk THANK YOU SO MUCHH

  • @redthesussybaka69
    @redthesussybaka69 10 месяцев назад +2

    Can you make a tutorial on how to do this but with two doors and with a keybind?

  • @kankanth
    @kankanth 2 месяца назад +3

    Why do the hinge work but the door doesn't?

  • @MetaBellaOfficial
    @MetaBellaOfficial Год назад +1

    TY for this tutorial!

  • @ronydemons6678
    @ronydemons6678 9 месяцев назад +1

    Hey man i have been wondering how do i start learning roblox lua so i can make stuff work? i wanna become a dev

  • @GDNiceBoi
    @GDNiceBoi День назад

    When I enter the game it immediately says "Door is not a valid member of Part "Workspace.Door.Door" , how do I fix this?

  • @banana_man664
    @banana_man664 2 месяца назад +1

    i followed the script and it didnt work and i have no idea why does anyone know what could possibly be wrong?

    • @Dogey_Dogger
      @Dogey_Dogger 2 месяца назад

      Is the hinge moving? If the hinge is moving but the rest of the door isn't then it's probably because the door (not the hinge) is anchored. The tutorial says that you should anchor everything for some reason but for it to work make sure the door and any decorations on it are unanchored but the hinge should stay anchored.

  • @mcsiopao
    @mcsiopao Год назад +1

    Yo can u make sum like when u click the part it will give u food or something?

  • @Sarz_tagz
    @Sarz_tagz 11 месяцев назад +2

    tbh bro u should put the script in the description so mfs dont have to type for 30 mins trying not to mess up one word

    • @Leminvit
      @Leminvit 11 месяцев назад +1

      True

    • @BattleCompanionsGames
      @BattleCompanionsGames 4 месяца назад +1

      How are you gonna learn by copying

    • @devmelonroblox
      @devmelonroblox  4 месяца назад

      @BattleCompanionsGames truw

    • @TopHatDeveloper
      @TopHatDeveloper 3 месяца назад

      @@BattleCompanionsGames the problem is that u can by accident make 1 LETTER capitalized and it wont work, sending you into the spiral of insanity for TWO HOURS ;A;

    • @BattleCompanionsGames
      @BattleCompanionsGames 2 месяца назад

      @@TopHatDeveloper thats part of learning. When you make a script it wont work every time

  • @fronkoguy9407
    @fronkoguy9407 Год назад +1

    The first code I’ve done which actually works

  • @1a21a
    @1a21a Год назад +1

    Whoa nice thumbnail and tutorial funic

  • @offbrandSoulEclectic
    @offbrandSoulEclectic 10 месяцев назад

    using this right now to script for a myth game im making rn and i feel like a goddamn god when im doing it because i have not a clue what im actually doing but im just following the tutorial

  • @megatechtonic
    @megatechtonic 7 месяцев назад +1

    heres the code bc ik yall not tryna type allat
    local TS = game:GetService("TweenService")
    local Door = script.Parent.Door
    local Hinge = script.Parent.Hinge
    local Open = false
    local openState = {}
    openState.CFrame = Hinge.CFrame * CFrame.Angeles(0, math.rad(90),0)
    local closeState = {}
    closeState.CFrame = Hinge.CFrame * CFrame.Angeles(0,0,0)
    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(Hinge, tweeninfo, openstate)
    local Closeanim = TS:Create(Hinge, tweeninfo, closeState)
    Door.ClickDetector.MouseClick:Connect(function()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else
    Open = false
    CloseAnim:Play()
    end
    end)

  • @Valentinathewitch
    @Valentinathewitch Год назад +2

    Hi! I wrote the script but the only thing appearing is the clicking icon and it won't open. does anyone know why.

    • @officiallydeevolv3
      @officiallydeevolv3 10 месяцев назад

      unanchor the 'door' part inside of the model but keep the hinge anchored

  • @Groovy_Gaming
    @Groovy_Gaming Год назад +2

    Does anyone know how i can make a sound play when the door opens, but a different sound plays when it closes?

    • @arbitrarilyentertainment8553
      @arbitrarilyentertainment8553 Год назад

      Im not exactly sure but you could probably put the two different sounds at this part of the code so that it can be specified which plays when
      Door.ClickDetector.MouseClick:Connect(function()
      if Open == false then
      Open = true
      OpenAnim:Play()
      else
      Open = false
      CloseAnim:Play()
      end
      end)

  • @B-Cat100
    @B-Cat100 Год назад +7

    Hey, what should I do if my door is multiple parts? (I want my door to look more detailed), because it never works and just moves the main door part but not the rest

    • @devmelonroblox
      @devmelonroblox  Год назад +2

      You can just weld it all to the part that you wil move

    • @B-Cat100
      @B-Cat100 Год назад +1

      @@devmelonroblox i tried some things to fix it but it doesn’t open, at one point the hinge opened..

    • @masey_gt
      @masey_gt Год назад +1

      @@B-Cat100 Look at the debug menu, it has many bugs.

    • @devmelonroblox
      @devmelonroblox  Год назад

      If it’s on my screen that’s not yo do with the script it’s with my plugins

    • @christophaebi8423
      @christophaebi8423 Год назад +3

      @@B-Cat100 See the comment below from @Zer0Milk
      "Had the same issue, un-anchored the door and it worked. Try that"
      This worked for me ;o)

  • @TheLavaMasterz
    @TheLavaMasterz Год назад +1

    Bro when i press on the door nothing happens what did i do wrong? Is it because i added more things to the model, i also added a handle and all the stuff. Please respond

    • @sergiodiblasi9606
      @sergiodiblasi9606 Год назад

      maybe its too late to respond, but its probably because the door is anchored, and if you want to add more things to the door you have to use a weld or a weldconstraint to attach them to the door and still unanchor the things you added to it, if it dosen't work i don't know what the problem is

  • @kidsfun7384
    @kidsfun7384 8 дней назад

    am i able to add it as an model not a part for decor?

  • @toonboi6775
    @toonboi6775 Год назад +2

    i used the script exactly but the door rotated the wrong way, what is wrong?

    • @Animblox
      @Animblox Год назад +1

      Have you made sure you have:
      openState.CFrame = Hinge.CFrame * CFrame.Angles(0, math.rad(90),0)

  • @ItsAstro300
    @ItsAstro300 Год назад +1

    Hey how so u see if there is weld in a part, I followed every step but the door wouldn't open, can u help me?

  • @mathisvoinier9338
    @mathisvoinier9338 Год назад +3

    When i click on door the hinge is only moving and not the door. Someone know how to fix ?

  • @redelement5634
    @redelement5634 Месяц назад +1

    would anyone know how to add sounds to the door?

    • @devmelonroblox
      @devmelonroblox  Месяц назад

      @@redelement5634 insert a sound in the door and then do sound:Play() when you click the door

  • @brian39
    @brian39 Месяц назад

    I unanchored each door part of my model, added a weldconstraint on each part of my model, removed all welds, i checked script analysis and its saying it doesnt have any errors, yet its still not opening when i click the door, what am i doing wrong?

    • @brian39
      @brian39 Месяц назад +1

      i finally fixed it

  • @unlucky_chancez
    @unlucky_chancez 13 дней назад +1

    absolutely none of this worked not even the hinge
    explain it better please, otherwise i asted a few hours on this

  • @HomewaveA
    @HomewaveA 8 месяцев назад

    So I've added a little door handle onto it and made sure to weld constraint all the parts to the hinge and i've unanchored the door and door handle however it will not open still.

    • @HomewaveA
      @HomewaveA 8 месяцев назад

      The door is a weld/It's a ton of parts I welded together into a detailed looking door

    • @BradMad
      @BradMad 8 месяцев назад

      Same

  • @bunnygaming6388
    @bunnygaming6388 3 месяца назад

    How do i actually modify the door? I can't add brick, only one singular part can move!

  • @einarlarsjonsson5953
    @einarlarsjonsson5953 9 месяцев назад +1

    i dont know how to group stuff😭

  • @doorms_door3600
    @doorms_door3600 Год назад +5

    guys you don't have to type it heres the script copy it from here
    local TS = game:GetService("TweenService")
    local Door = script.Parent.Door
    local Hinge = script.Parent.Hinge
    local Open = false
    local openState = {}
    openState.CFrame = Hinge.CFrame * CFrame.Angles(0, math.rad(90),0)
    local closeSate = {}
    closeState.CFrame = Hinge.CFrame * CFrame.Angles(0,0,0)
    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(Hinge, tweeninfo, openState)
    local CloseAnim = TS:Create(Hinge, tweeninfo, closeSate)
    Door.ClickDetecter.MouseClick:Connect(function()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else
    Open = false
    CloseAnim:Play()
    end
    end)

    • @devmelonroblox
      @devmelonroblox  Год назад

      Nice

    • @robloxgrayson2460
      @robloxgrayson2460 Год назад +2

      here is a fixed version because he misspelled some things
      local TS = game:GetService("TweenService")
      local Door = script.Parent.Door
      local Hinge = script.Parent.Hinge
      local Open = false
      local openState = {}
      openState.CFrame = Hinge.CFrame * CFrame.Angles(0, math.rad(90),0)
      local closeState = {}
      closeState.CFrame = Hinge.CFrame * CFrame.Angles(0,0,0)
      local tweeninfo = TweenInfo.new(1)
      local OpenAnim = TS:Create(Hinge, tweeninfo, openState)
      local CloseAnim = TS:Create(Hinge, tweeninfo, closeState)
      Door.ClickDetecter.MouseClick:Connect(function()
      if Open == false then
      Open = true
      OpenAnim:Play()
      else
      Open = false
      CloseAnim:Play()
      end
      end)

    • @samirvargas323
      @samirvargas323 Год назад

      @@robloxgrayson2460 thank u very much

  • @gamer2-fortnight_2
    @gamer2-fortnight_2 Год назад +3

    for me it does not work :(
    😭☹

  • @Radhika098_Productions
    @Radhika098_Productions Год назад +1

    i try it but it was not opening can u tell the problem if possible ? but clicking icon was coming.

    • @Animblox
      @Animblox Год назад +2

      Try unanchoring the door but anchor the hinge

  • @sophiegameeeees
    @sophiegameeeees 8 месяцев назад

    Im trying to weld the door and the hinge but everytime i try to put the door as part0 or part1 it wont weld

  • @XProductionsOrami
    @XProductionsOrami 9 месяцев назад

    how can you make the door slide? and not turn you know like a store door

  • @Poppom99862
    @Poppom99862 Год назад +2

    does it work if the door is not a part but a union?

  • @BlobsMations
    @BlobsMations 9 месяцев назад

    I'm pretty sure coating is basically just random letters and words and random numbers

  • @ZennoOnYt
    @ZennoOnYt 3 месяца назад

    When i add a weld constraint to the door part i dont see part0 and part1

  • @FinleyFish9
    @FinleyFish9 5 месяцев назад +1

    heres the script
    local TS = game:GetService("TweenService")
    local door = script.parent.door
    local hinge = script.parent.hinge
    local open = false
    local openstate = {}
    openstate.cframe = hinge.cframe * cframe * cframe.angles (0,math.rad(90),0)
    local closestate = {}
    closestate.cframe = hinge.cframe *cframe.angles(0,0,0)
    local tweeninfo = tweeninfo.new(1)
    local openanim = TS:Create(hinge,tweeninfo,openstate)
    local closeanim = TS:Create(hinge,tweeninfo,closestate)
    door.clickdetector.mouseclick:connect*(function()
    if open == false then
    open = true
    openanim:play()
    else
    open = false
    closeanim:play()
    end
    end)

  • @iwasneverkilled3516
    @iwasneverkilled3516 Год назад +1

    how do i make this door work but with proximity prompt instead of click detector

    • @SpextraGame
      @SpextraGame 10 месяцев назад

      thas what im sayin

  • @bilalhasleftthechat9986
    @bilalhasleftthechat9986 Год назад +2

    how i make a door sound when open/closed

    • @devmelonroblox
      @devmelonroblox  Год назад

      You add a sound into the door and then you say Sound:Play()

  • @brazycrud1299
    @brazycrud1299 Год назад +2

    it works but it dont like it shows up to open the door but it dont open

    • @devmelonroblox
      @devmelonroblox  Год назад

      What do you mean?

    • @devmelonroblox
      @devmelonroblox  Год назад

      In roblox studio i don’t know if it’s for you too but the clicking icon doesn’t appear

  • @globlinus
    @globlinus Год назад +9

    It doesnt work i didnt built a room the hinge has a click icon but if i click it doesnt do anything
    local TS = game:getService("TweenService")
    local Door = script.parent.Door
    local Hinge = script.Parent.Door
    local Open = false
    local openState = {}
    openState.CFrame = Hinge.CFrame * CFrame.Angles(0. math.rad(90),0)
    local closeState = {}
    closeState.Cframe = Hinge.CFrame * CFrame.Angles(0,0,0)
    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(Hinge, TweenInfo, openState)
    local CloseAnim = TS:Create(Hinge, TweenInfo, closeState)
    Door.ClickDetector.MouseClick:Connect(function()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else
    Open= false
    CloseAnim:Play()
    end
    end)

    • @globlinus
      @globlinus Год назад

      I fixed it but the hinge moves with the door

    • @mykiso
      @mykiso Год назад +1

      @@globlinus make the hinge invisible

    • @devmelonroblox
      @devmelonroblox  Год назад

      Isn’t that supposed to happen?

    • @channel12849
      @channel12849 Год назад

      found it

    • @channel12849
      @channel12849 Год назад

      local Hinge = script.Parent.Hinge

  • @chillguy12
    @chillguy12 2 месяца назад +1

    why can't you just put the script in the description

  • @elysefamily4755
    @elysefamily4755 Год назад

    Nice tutorial but i had a hard time doing it but its alright

  • @TripleFizzz
    @TripleFizzz 2 месяца назад

    It didnt work can you just copy and paste the code into the comments please?

  • @lukemakesstuff7351
    @lukemakesstuff7351 Год назад +1

    underrated

  • @fanvr3857
    @fanvr3857 4 месяца назад +1

    it doesnt work i unanchored the middle of the mart nothing

  • @Mr-meme12
    @Mr-meme12 Год назад +1

    My door won’t move :/

    • @C-O-R-R-U-P-T-I-O-N
      @C-O-R-R-U-P-T-I-O-N 11 месяцев назад

      Me too

    • @Mr-meme12
      @Mr-meme12 11 месяцев назад

      @@C-O-R-R-U-P-T-I-O-N mines fixed now look down in the comments

  • @Arthur01907I
    @Arthur01907I 7 месяцев назад +2

    I t would have be cool if you could have put the script part in comment rather than wasting my time

  • @xbrunojo
    @xbrunojo 3 месяца назад +2

    local TS = game:GetService("TweenService")
    local Door = script.Parent.Door
    local Hinge = script.Parent.Hinge
    local Open = false
    local openState = {}
    openState.CFrame = Hinge.CFrame * CFrame.Angles(0, math.rad(90), 0)
    local closeState = {}
    closeState.CFrame = Hinge.CFrame * CFrame.Angles(0, 0, 0)
    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(Hinge, tweeninfo, openState)
    local CloseAnim = TS:Create(Hinge, tweeninfo, closeState)
    Door.ClickDetector.MouseClick:Connect(function()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else
    Open = false
    CloseAnim:Play()
    end
    end)

  • @4fiq_NK4
    @4fiq_NK4 Год назад +2

    How to add sound effect tho

    • @devmelonroblox
      @devmelonroblox  Год назад +1

      You just add in a sound into the door and when you want it to play, in the script you write Sound:Play() Make sure Sound is the name of your sound that you are using

  • @김춘자할미
    @김춘자할미 12 дней назад

    do unions not work?

  • @homieg4655
    @homieg4655 9 месяцев назад

    How can i make it swing out in another direction?

  • @CleetusTheFish
    @CleetusTheFish Год назад +1

    how would i add a doorknob to this model?

  • @townsendvondinklestein
    @townsendvondinklestein Год назад

    how do i make it so pressing a key opens it? just replace the .mouseclick with .keypressE?

    • @the_br4ve777
      @the_br4ve777 6 месяцев назад +1

      use a proximity prompt

  • @lycheetism
    @lycheetism Год назад +4

    Is there anything wrong with my script? I tried it and it didnt work
    local TS = game:GetService("TweenService")
    local Door = script.Parent.Door
    local Hinge = script.Parent.Hinge
    local Open = false
    local openState = {}
    openState.CFrame = Hinge.CFrame * CFrame.Angles(0, math.rad(90),0)
    local closeSate = {}
    closeState.CFrame = Hinge.CFrame * CFrame.Angles(0,0,0)
    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(Hinge, tweeninfo, openState)
    local CloseAnim = TS:Create(Hinge, tweeninfo, closeSate)
    Door.ClickDetecter.MouseClick:Connect(function()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else
    Open = false
    CloseAnim:Play()
    end
    end
    I even checked if there was anything missing and there wasnt so idk pls somebody tell me if there is anything different

    • @devmelonroblox
      @devmelonroblox  Год назад

      Join the server I would be able to help you out if you have questions

    • @distorti0n_
      @distorti0n_ Год назад

      hmm you spelt state wrong in the closeState script

    • @robloxgrayson2460
      @robloxgrayson2460 Год назад

      yeah, and also did you weld the door to the hinge?

    • @robloxgrayson2460
      @robloxgrayson2460 Год назад +1

      so mistakes:
      1. you spelled closeState wrong
      2. you spelled ClickDetector wrong
      3. you forgot to put parentheses at the end of the function

    • @lycheetism
      @lycheetism Год назад

      @@robloxgrayson2460 I fixed it and it still didnt work

  • @caseytube1519
    @caseytube1519 Год назад

    Why won’t it work, I unanchored it, I rescripted it multiple times, I tried everything I could think of, fixed bugs but it still stood stuck, not moving. I’m about to completely give up.

  • @K.o.a.z.y
    @K.o.a.z.y 2 месяца назад

    im to lazy to type code pls gimme

  • @jennyboi4591
    @jennyboi4591 Год назад

    I need help for some reason only the hinge is moving

  • @HighFiveAviation
    @HighFiveAviation Год назад +4

    script:
    local TS = game:GetService("TweenService")
    local Door = script.Parent.Door
    local Hinge = script.Parent.Hinge
    local Open = false
    local openState = {}
    openState.CFrame = Hinge.CFrame * CFrame.Angles(0, math.rad(90),0)
    local closeState = {}
    closeState.CFrame = Hinge.CFrame * CFrame.Angles(0,0,0)
    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(Hinge, tweeninfo, openState)
    local CloseAnim = TS:Create(Hinge, tweeninfo, closeState)
    Door.ClickDetector.MouseClick:Connect(function()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else
    Open = false
    CloseAnim:Play()
    end
    end)

  • @qiwandaledingil9025
    @qiwandaledingil9025 Год назад

    why is it so that every single door i do that it doesnt work and this ALSO didnt work like the other scripts i looked from yt😔

  • @aannddrreeaass
    @aannddrreeaass Год назад

    i made the hinge fuction like a door- how to fix that

  • @Bobthebuilder2e2
    @Bobthebuilder2e2 Месяц назад

    Dude after 42:00 seconds you go so fast it is hard for us to understand bro

  • @StickminTheYT
    @StickminTheYT 4 месяца назад

    i want to copy the script tho. where can i get it?

  • @HesterKNT
    @HesterKNT 3 месяца назад

    How do I make it so multiple parts move

  • @MrMath500
    @MrMath500 Год назад +2

    hi could you make a door for my game pls

  • @Mr-meme12
    @Mr-meme12 Год назад

    Idk what I’m doing wrong I’ve done everything and been over the code multiple times and only the hinge will move when I click the door
    Even when I make a new pair of parts the same thing happens

    • @iwasneverkilled3516
      @iwasneverkilled3516 Год назад

      unanchor the door?

    • @Mr-meme12
      @Mr-meme12 Год назад

      @@iwasneverkilled3516 YESS THANKS YOU 🙏🙏🙏🙏🙏

    • @iwasneverkilled3516
      @iwasneverkilled3516 Год назад

      @@Mr-meme12 now how do i make this door work with button interest (Hold F to interact)

    • @AlanSosa
      @AlanSosa 10 месяцев назад

      @@iwasneverkilled3516 I need help, when I do that the door falls down, it has multiple pieces and I don't know how to fix that so it works

  • @andres_mannu05
    @andres_mannu05 Год назад

    cool

  • @lesspees8222
    @lesspees8222 Год назад +1

    When i click the hinge just disapears

    • @masey_gt
      @masey_gt Год назад

      Look at the debug menu, it has many bugs.

  • @rowan16
    @rowan16 Год назад

    My door won’t move so I might just use a free model

  • @caseytube1519
    @caseytube1519 Год назад

    For so e reason the door won’t even move?
    I did everything right though.

  • @I_Do_Stuff__
    @I_Do_Stuff__ Год назад

    Does the door have to be a part or can it be a mesh?

  • @Nuggetsplk
    @Nuggetsplk 8 месяцев назад

    why its no working?? bro pls teach me i est it so hard and is not working :(

  • @BUKOYAY
    @BUKOYAY 4 месяца назад +1

    please paste the script

  • @elekkuromppunen2671
    @elekkuromppunen2671 Год назад

    Why did you SPEED THE VIDEO?! I almost didint see shit!

  • @ReaperRYT_
    @ReaperRYT_ Год назад

    It moved the hinge instead of the door why

  • @blepboiyt
    @blepboiyt 10 месяцев назад

    why does only my hinge move and not the door lol

  • @Mr-meme12
    @Mr-meme12 Год назад

    It’s broken I swear I have re-wrote it many times and always only the hinge moves when I click the door

    • @devmelonroblox
      @devmelonroblox  Год назад

      Are you sure you welded it?

    • @Mr-meme12
      @Mr-meme12 Год назад

      @@devmelonroblox I removed all normal welds and added the weld constraint.
      (The fact that you replied makes me respect you heavily, you care about your viewers even though you have loads, thank you, you’ve just gotten a sub)

    • @Mr-meme12
      @Mr-meme12 Год назад

      @@devmelonroblox ruclips.net/user/shortsaeMjOkLhpbM?feature=share sorry my laptop looks like 💩

  • @Darrs_animations
    @Darrs_animations Год назад

    When you click on the door it won’t work

  • @robloxgrayson2460
    @robloxgrayson2460 Год назад +1

    He needs to reach at least 1k subscribers.

    • @masey_gt
      @masey_gt Год назад

      Look at the debug menu, it has many bugs.

  • @kaisdoingstuff
    @kaisdoingstuff Год назад

    it doesnt work for me
    when i click the door the door isnt moving at all

  • @southtrap9844
    @southtrap9844 3 месяца назад +1

    It didnt work :(

  • @rowdan123
    @rowdan123 7 месяцев назад

    for cool people (i mean stupid btw)
    local TS = game:GetService("TweenService")
    local Door = script.Parent.Door
    local Hinge = script.Parent.Hinge
    local Open = false
    local openState = {}
    openState.CFrame = Hinge.CFrame * CFrame.Angles(0 math.rad(90),(0
    local closeState = {}
    closeState.CFrame = Hinge.CFrame * CFrame.Angles(0,0,0)

    local tweeninfo = TweenInfo.new(1)
    local OpenAnim = TS:Create(Hinge, TweenInfo, openState)
    local CloseAnim = TS:Create(Hinge, TweenInfo, closeState)

    Door.ClickDetector.MouseClick:Connect(function ()
    if Open == false then
    Open = true
    OpenAnim:Play()
    else
    Open = false
    CloseAnim:Play()
    end
    end)

  • @XGamerCraftsX
    @XGamerCraftsX 8 месяцев назад

    Not working :(

  • @CarrotGamesStudios
    @CarrotGamesStudios Год назад

    it animated the hinge instead of the door.

  • @sharonigat4428
    @sharonigat4428 Год назад

    How do i make a door working with alot of parts?

    • @sergiodiblasi9606
      @sergiodiblasi9606 Год назад

      its easy, you need to make the parts you want to add, make them touch the door, and use a weld, or a weldconstraint to actually attach them to the door, and obviously unanchor them. its better if you put them in the door model