Hiding in Closets - Doors Tutorial #6

Поділитися
Вставка
  • Опубліковано 7 чер 2024
  • DISCORD ► / discord
    TWITCH ► / gnomecode
    TWITTER ► / gnomecoderblx
    WEBSITE ► gnome.codes/
    TIMESTAMPS ►
    00:00 Intro
    00:40 Placing templates
    01:33 Creating basic closet
    06:11 Creating closet module
    14:48 Exiting the closet
    20:16 Creating doors
    23:00 Scripting doors
    26:53 Changing rotation orientation
    28:00 Adding sound
    28:50 Testing virtual server
    30:25 Changing character orientation
    31:20 Player camera
    35:00 Outro

КОМЕНТАРІ • 359

  • @KevKevDawg
    @KevKevDawg 5 місяців тому +3

    I been trying to script for the past 7 years and i really just lose motivation but your series has motivated me enough to atleast get decent at scripting and now I have created 3 projects which have had over 100k visits!

  • @ColRealPro
    @ColRealPro Рік тому +9

    As a scripter, I just watch these cause they are entertaining and I love how easy it is for beginners to understand this

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

      same

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

      I’m a beginner, but I just watch these when I’m bored, because it doesn’t really work for me.

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

    Im so happy that this series have went so far!!!

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

    i love that you're trying your best to make videos quickly. Keep up the good work!

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

    Gnome thank you so much for making this series! I've quickly learned a lot, and we're just getting started!

  • @PonkoKnight
    @PonkoKnight Рік тому +11

    These tutorials just keep getting better and better. I still think back to the teddy series and see that you've improved alot over that time, not just in scripting but also in the editing of the videos. Keep up the great work.

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

      Thank you! That's what I love about making these series, both me and my followers can grow and improve together

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

      @@GnomeCode i need help my furniture wont generate after i did the open script where it moves out of the main room thing

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

      @@GnomeCode i mean my rooms wont generate

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

      @GoodBrainSalad* my furniture open script isnt generating rooms

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

      @@godzil7 Can you paste your code here and what does says in output?

  • @Player-te2xf
    @Player-te2xf Рік тому

    Thank you so much GnomeCode :D. I don't play doors but, I always watch your new series videos because they are interesting to see how you've improved since your first series, like a lot you've gotten better at coding, editing videos, and interesting. I hope you continue to make series :D

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

    wow I din't expect this to be so quick! keep up the amazing work gnomecode I see you are working very very hard

  • @gentlemen_studios
    @gentlemen_studios Рік тому +7

    I'm very excited to see you script the monster next episode. Will you also add a time limit before you die while you're in one of the closets from doors?

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

    Please do more of these tutorials, not only is this improving my scripting skills, but it also helps me create a dream fan game. Keep up the awesome work!

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

    Even tho I’m not making a doors type game, these videos are always so helpful!

  • @theoutlaw9759
    @theoutlaw9759 Рік тому +38

    I love how GnomeCode releases his videos so quickly! Thanks, I've really learned a lot from this series so far!

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

    These tutorials are awesome! I wasn't even expecting a tutorial today! and also your my favourite Roblox scripting youtuber! I'm glad your doing a tutorial on doors and I can't wait until next episode for the entities!

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

    bro i love this serie so much
    thanks for this serie i love you!

  • @ProdByJuice.
    @ProdByJuice. Рік тому +1

    Finally, you dont know how long ive been trying to find a tutorial like this. Thanks.

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

    GnomeCode was one of my first roblox UA-camr and i love him because he have a nice and clear voice. and he explain all very clear !
    I learned so much from all of his videos !
    Thank you GnomeCode for you hard work !
    Give him all your support !

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

    you are so talented! I've been watching you since the 2d series and always come to you when I need help with something. Great work, keep it up!
    Ps: Road to 100k!!

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

      Wow that's a long time ago! Thanks for sticking around

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

      @@GnomeCode you're awesome!

  • @pattyradio
    @pattyradio Рік тому +4

    I love your tutorials! I've been using this tutorial so far to create a similar to doors game but without enemies and more exploration/badge based.
    I would love it if you could have certain rooms spawn at certain numbers? (like room 50 and 100 in doors)

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

    Best episode so far! Can't wait for monsters to come :)

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

    I'm gonna try and make a game like doors and ill definitely use this tutorial to help me! Keep up the good work Gnomecode!

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

    Probably in the 8th episode, you could make 'dark rooms' and maybe 'spiders in drawers'.
    Basically rooms have a BoolValue in them called DarkRoom, and every room there is a chance for it to be true or false.
    If its true, all lights are off. If its false, all lights are on.
    Spider explanation:
    Drawers have a bool value too called SpiderInside, for every drawer spawned, there is a chance for it to be true or false.
    If its true, there is a spider model inside that jumps to your head because you may make an attachment on the face that you made (instance . new)
    If its false, no spiders of course.

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

    Please make more of these they are so fun as little projects to do, I also am using them to learn scripting because I find it easier to learn while making a game and not while learning specific functions

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

    So cool cant wait for the pad lock puzzle part which is in door 50 😅

  • @JandAVideoGames
    @JandAVideoGames Рік тому +4

    Also for the room generation it only spawns in rooms you are close to and the other rooms 7 doors back get destroyed this will help prevent lag when the you start adding more functionality to the game

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

    Gnome code! Thanks for being there to teach me how to script! I have also been following the tower defense series as ive been following this one! You make these tutorials simple and easy! You even show common mistakes most people would make! Thanks for your help Gnome code! (edit) HURRY UP WITH THE NEXT EPISODE PLZ! (EDIT 2.0) GNOME CODE PLEASE HURRY ITS OVER A WEEK SINCE THIS EPISODEEEEE...

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

    Yay ! A other video of Gnome Code !!! :D

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

    Thank you so much for this things!!

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

    I love how the start room is still a grey box, but now it’s a slightly more polished grey box.

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

    It’s unbelievable how fast gnomecode is rapidly making these tutorial videos, amazing work gnomecode!

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

    i cannot thank you enough for these tutorials. I actually now feel like I will make a good game for once. None of the other tutorials i tried worked, but yours is the only one that did!(im actually being honest here ;-;)
    but theres just one tiny problem. entering the closet works, everything works, its fine. but the problem is when im entering and leaving, only the left door does the tweening animation, the right door is just frozen. did i make a typo or smth?
    also heres my closet script for anyone that wants it:
    local TweenService = game:GetService("TweenService")
    local ReplicatedStorage = game:GetService("ReplicatedStorage")
    local events = ReplicatedStorage:WaitForChild("Events")
    local moveCamEvent = events:WaitForChild("MoveCam")
    local closet = {}
    function closet.MoveHinge(hinge, direction)
    local openAngle = -110
    local goalCFrame = hinge.CFrame *CFrame.Angles(0, math.rad(openAngle*direction), 0)
    local doorTween = TweenService:Create(hinge, TweenInfo.new(0.5),{CFrame=goalCFrame})
    doorTween:Play()
    end
    function closet.MoveDoors(model, direction)
    model.Primary.Open:Play()
    closet.MoveHinge(model.LeftHinge, 1 *direction)
    closet.MoveHinge(model.RightHinge, -1 *direction)
    task.wait(0.5)

    end
    function closet.PlayerLeave(player, model)
    local character = player.Character
    if not character then return end

    closet.MoveDoors(model, 1)
    character:PivotTo(model.Outside.CFrame * CFrame.Angles(0, math.rad(180), 0))
    character.Humanoid.WalkSpeed = 16
    character.Humanoid.JumpPower = 0
    closet.MoveDoors(model, -1)
    model.hasPlayer.Value = nil
    end
    function closet.PlayerEnter(player, model)
    local character = player.Character
    if not character then return end

    model.hasPlayer.Value = player
    character.Humanoid.WalkSpeed = 0
    character.Humanoid.JumpPower = 0
    character:PivotTo(model.Outside.CFrame)
    moveCamEvent:FireClient(player, model.Outside.CFrame)
    closet.MoveDoors(model, 1)
    character:PivotTo(model.Inside.CFrame)
    moveCamEvent:FireClient(player, model.Inside.CFrame)
    closet.MoveDoors(model, -1)
    end
    function closet.New(template)

    local model = workspace.Furniture.Closet:Clone()
    model:PivotTo(template.CFrame)
    model.Parent = template.Parent

    local hasPlayer = Instance.new("ObjectValue")
    hasPlayer.Name = "hasPlayer"
    hasPlayer.Parent = model

    local outsidePrompt = Instance.new("ProximityPrompt")
    outsidePrompt.ActionText = "Enter Closet"
    outsidePrompt.MaxActivationDistance = 5
    outsidePrompt.Parent = model.Outside

    local insidePrompt = outsidePrompt:Clone()
    insidePrompt.ActionText = "Leave Closet"
    insidePrompt.MaxActivationDistance = 2
    insidePrompt.Parent = model.InsidePrompt

    outsidePrompt.Triggered:Connect(function(player)
    if hasPlayer.Value == nil then
    outsidePrompt.Enabled = false
    closet.PlayerEnter(player, model)

    end
    end)
    insidePrompt.Triggered:Connect(function(player)
    if hasPlayer.Value == player then
    insidePrompt.Enabled = false
    closet.PlayerLeave(player, model)
    insidePrompt.Enabled = true
    outsidePrompt.Enabled = true
    end
    end)

    template:Destroy()
    end
    return closet

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

    the way you made the closet is way more complicated than how they made it because it was made as a animation in doors

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

    Gnome code is the best code explainer no cap

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

    what i would love next would be a game teleporter system like doors has, that would be very useful for my game! also will there be a cutscene tutorial later?

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

    I haven't watched all of the videos yet, but do you remove the rooms behind you at a certain point? For example, there will always been 2 rooms behind you and 1 room infront of you at each given time, and the room you're currently in.

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

    Good job yet again Gnomecode!

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

    Keep the good work!

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

    The best tutorial

  • @alvaro878.
    @alvaro878. Рік тому

    you can also use tweenservice to teleport player to closet, and looks doors

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

    cant wait for the entitys!

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

    Hi! Can you publish the game like you did with the others? I really want to play it and add things. You make great tutorials and you are the only one that makes understandable tutorials!

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

      he cannot publish the game and if you ask why then think about it

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

    Can you make a tutorial on the Seek Chase and/or door 50

  • @Yu-Gi-Oh36508
    @Yu-Gi-Oh36508 Рік тому +1

    you should do a video on how to let the code know which door you are on and delete old doors and only gen a few doors ahead

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

    Can you do an episode on the monsters? I love this series

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

    If you wanna add a exit and enter sound do this:
    Under the PlayerEnter, do model.Primary.(Your Enter Sound):Play()
    And then under the PlayerLeave, do model.Primary.(Your Exit Sound):Play()

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

    cool video! just wondering how can i make the player have the press W to get out like in the real game instead of another prompt?

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

    hey im watching the tower defence game tutorial and my animations aren't working im thinking that is the animationFolder part because i dont have one and if i had where do i put it in?
    also do i put the walk inside it?
    edit: there is a bunch of people with the same problem on the episode 3 idk if they already solved it

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

    There's a problem i've been having since part 1. My room generationis not generating 100 rooms. Instead it generates a random amount.

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

    Yess gnomecode can't wait for the Teddy chase haha or will or be a new character like that easter akin from Teddy 🐻

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

    Thanks man you're pro

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

    Awesome content, Also you should make more (How to scrpt tutorials)👍

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

    Hey Gnome Code, I am having some issues and need your help.
    So uh, I have done exactly like the video, but for some reason, the closet doesn't have the Promoxity Prompt,also I don't want to have
    the furniture in part 4. Is that the reason the scripts don't work?

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

    Hey GnomeCode!, The next video will you start making the monsters?

  • @stefan_-yc4zs
    @stefan_-yc4zs Рік тому

    You have something miss to make in tower defense game
    1: make skins for towers and crates in shop and equit skin or unequit skin
    2:adding seasons, events
    3: the slots of towers if you equit a tower to show the towers on the slot to know what tower you equit
    4: vote modes
    5: show random maps to vote it and the start button to start istant
    6: change button to change the maps to vote
    7: the finnaly boss hp bar
    8: in menu on shop to show the first lvl tower stats
    9: music at menu and the finnal boss music
    10: died enemys sounds
    11: tower shot effect
    12: the shot hit zombie effect
    13: show on the tower total damage and total money spend on it
    14: making enemy than stun towers for seconds
    15: the died finnaly boss animation

  • @Alexis-pf7mf
    @Alexis-pf7mf 24 дні тому

    I have an idea for the next part!, itll be basically just the crouching and vents since i really want to do rooms where you need to find the vent to go to the other section in the room then leading u to de exit

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

    Will you add some entity like rush ambush figure seek glitch hide eyes halt Timothy jack A-60 and shadow?

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

    Gnome Code do u know how i could i make like when u enter the closet ur camera rotates like doors, could u give me an example script please.
    Edit: i hope he answers :(

  • @user-kh2sg4by9s
    @user-kh2sg4by9s Рік тому +1

    now you can make rush, but please make to he spawns every 9-14 rooms like original

  • @7870javier
    @7870javier Рік тому

    Hey GnomeCode, I was wondering if the next tutorial could be how to make custom rooms like door 50, door 100, are not in the rooms folder basicly like how to make door 100 as a stage thats not in the rooms folder can you?

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

    Cqn you make it so entering the closet is smoother perhaps by using a tween thingy?

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

    Is there a way I can Just make the Hiding in closets without needing the past Modules and templates you made with all the other furniture :)
    It would help alot but love your videos !

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

    Congrats on the 70k

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

    will you add an animation in the next video (if its a monster like rush, ambush, screech, e.t.c)

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

    Your tutorials are the best I've seen on youtube!
    you helped me a lot with the tutorials on "how to make a game like DOORS"
    GnomeCode.
    PS: good luck with the next videos

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

    average gnome code W

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

    Nice, I wonder when monsters will be made

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

    for some reason when i enter and leave and enter my closets the closet’s door just keep rotating 10 grades, and when i enter and leave it 3 times then the doors are blocking me from the proximity prompt
    edit: fixed it idk how

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

    when will the new chapter come out?
    I need to make entities like Jack, Rush, Seek, Ambush and Figure

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

    When is the episode for Rush/Ambush or Halt like monsters?

  • @Arch-bx8wz
    @Arch-bx8wz Рік тому

    I'm making a Doors fan-game and these tutorials have been a big help
    Edit: wait so is part 7 making an entity like rush or ambush?

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

      he said so. if he made closets, then said the next episode is about making a monster... well then we know which one

  • @kauesun-roblox4265
    @kauesun-roblox4265 Рік тому +1

    Hey gnome if you see this, at the complex room generation video, theres an error for me that says "Attempt to index nil with 'Direction'" and it just randomly generates the amount of rooms instead of the amount of rooms that i put on the server script (example: 15 rooms to generate but generated 2) and im not the only person who has this problem, look at the recent comments on the complex generation video. So if you have time, then could you please help?

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

    Can you tell me how to find the humanoid of a player who activated a proximity prompt.

  • @justacuber800
    @justacuber800 7 місяців тому

    It works even with toolbox wardrobes?

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

    finally, entity time

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

    I have a problem, with playing with a friend in some key room when opening the door doesnt open. Holding the key and all i don't know someone can help me?

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

    cool closets!!! we waiting new video =))) thank you for cool content!

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

    How i can make a custom ProximityPrompt Gui?

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

    Yesss babby

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

    The proxsimty pro pt is not working :(

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

    Can't Wait for the Monster's Soon also I watched this 6 day's ago

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

    I think your doors is way better than real roblox doors good job :)

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

    Is it just me or does some random desk spawns inside of another desk rotated 90° or one just turns the wrong way randomly?

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

    gnome, my door opens the opposite way but the code is exactly the same, even the orientation of the hinge, can you help?
    edit: nvm i figured it out i put (0,5) instead of (0.5)

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

    very cool! but what is the difference between wait() and task.wait()? i've been using wait() all the time

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

      I think task.wait() is for waiting a task of the script end.

  • @Arch-bx8wz
    @Arch-bx8wz Рік тому

    btw if you want an authentic doors game with this then make a script to lock the camera into first person and make it so they can't jump

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

    @GnomeCode how to make animation play when getting inside and leaving from

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

    I don't even follow the tutorials I just watch them cuz I learn stuff I never knew before lol

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

    how do i make it when i open a door the room will appear instead the all rooms are appeard when u start the game, anyone knows how to do that?

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

    I have to take a break as soon I finish the part Well… I will wait for the next part

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

    You should try to make rooms fangame tutorial

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

    you are a best

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

    I love you GnomeCode i joined your discord and i wished that i can boost the server

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

    wabut dangerous if the player enters the closet and kills himself, then the value is bugged or also if he leaves the game

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

    Hey codingableGnome, My prompt ain't appearing, what do i do?

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

    The script Works But i have a problem if u activate Shift Lock in the closet you Can Move again and jump again if you are in the closet

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

    I can hear gnomecode typing and his room😂

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

    i still didn't watched the full tutorial, but if he didn't talk about the glitch where if you leave the closed right after entering the door glitches, to fix it just make the outside prompt hold duration 0.6, since the inside prompt is a copy of the outside prompt you don't need to change it

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

    Doors for everyone!

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

    So I used moveTo make a more realistic player placing insted of pivotto

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

    Good evening GnomeCode

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

    Can you show us how to make the hallways