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
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!
As a scripter, I just watch these cause they are entertaining and I love how easy it is for beginners to understand this
same
I’m a beginner, but I just watch these when I’m bored, because it doesn’t really work for me.
Im so happy that this series have went so far!!!
i love that you're trying your best to make videos quickly. Keep up the good work!
Gnome thank you so much for making this series! I've quickly learned a lot, and we're just getting started!
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.
Thank you! That's what I love about making these series, both me and my followers can grow and improve together
@@GnomeCode i need help my furniture wont generate after i did the open script where it moves out of the main room thing
@@GnomeCode i mean my rooms wont generate
@GoodBrainSalad* my furniture open script isnt generating rooms
@@godzil7 Can you paste your code here and what does says in output?
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
wow I din't expect this to be so quick! keep up the amazing work gnomecode I see you are working very very hard
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?
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!
same
Even tho I’m not making a doors type game, these videos are always so helpful!
I love how GnomeCode releases his videos so quickly! Thanks, I've really learned a lot from this series so far!
Thanks for the good vibes!
yea, quickly...
quickly
*literally the part 5 was release in 8 days ago.*
@@BaconBoyVN1234 8 days is rather quick
@@michaelmartins6132 no
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!
bro i love this serie so much
thanks for this serie i love you!
Finally, you dont know how long ive been trying to find a tutorial like this. Thanks.
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 !
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!!
Wow that's a long time ago! Thanks for sticking around
@@GnomeCode you're awesome!
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)
Best episode so far! Can't wait for monsters to come :)
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!
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.
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
So cool cant wait for the pad lock puzzle part which is in door 50 😅
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
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...
Yay ! A other video of Gnome Code !!! :D
Thank you so much for this things!!
I love how the start room is still a grey box, but now it’s a slightly more polished grey box.
It’s unbelievable how fast gnomecode is rapidly making these tutorial videos, amazing work gnomecode!
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
the way you made the closet is way more complicated than how they made it because it was made as a animation in doors
Gnome code is the best code explainer no cap
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?
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.
Good job yet again Gnomecode!
Cheers Dusty
Keep the good work!
The best tutorial
you can also use tweenservice to teleport player to closet, and looks doors
cant wait for the entitys!
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!
he cannot publish the game and if you ask why then think about it
Can you make a tutorial on the Seek Chase and/or door 50
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
Can you do an episode on the monsters? I love this series
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()
he literally did that in the video
@@TheMaxGuy he didnt
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?
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
There's a problem i've been having since part 1. My room generationis not generating 100 rooms. Instead it generates a random amount.
Yess gnomecode can't wait for the Teddy chase haha or will or be a new character like that easter akin from Teddy 🐻
Thanks man you're pro
Awesome content, Also you should make more (How to scrpt tutorials)👍
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?
Hey GnomeCode!, The next video will you start making the monsters?
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
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
Will you add some entity like rush ambush figure seek glitch hide eyes halt Timothy jack A-60 and shadow?
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 :(
now you can make rush, but please make to he spawns every 9-14 rooms like original
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?
Cqn you make it so entering the closet is smoother perhaps by using a tween thingy?
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 !
Congrats on the 70k
Thanks Ham
will you add an animation in the next video (if its a monster like rush, ambush, screech, e.t.c)
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
average gnome code W
Nice, I wonder when monsters will be made
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
when will the new chapter come out?
I need to make entities like Jack, Rush, Seek, Ambush and Figure
When is the episode for Rush/Ambush or Halt like monsters?
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?
he said so. if he made closets, then said the next episode is about making a monster... well then we know which one
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?
Your closet is bugged.
Can you tell me how to find the humanoid of a player who activated a proximity prompt.
It works even with toolbox wardrobes?
finally, entity time
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?
cool closets!!! we waiting new video =))) thank you for cool content!
Glad you like them!
How i can make a custom ProximityPrompt Gui?
Yesss babby
The proxsimty pro pt is not working :(
Can't Wait for the Monster's Soon also I watched this 6 day's ago
I think your doors is way better than real roblox doors good job :)
Is it just me or does some random desk spawns inside of another desk rotated 90° or one just turns the wrong way randomly?
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)
very cool! but what is the difference between wait() and task.wait()? i've been using wait() all the time
I think task.wait() is for waiting a task of the script end.
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
@GnomeCode how to make animation play when getting inside and leaving from
I don't even follow the tutorials I just watch them cuz I learn stuff I never knew before lol
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?
I have to take a break as soon I finish the part Well… I will wait for the next part
You should try to make rooms fangame tutorial
you are a best
I love you GnomeCode i joined your discord and i wished that i can boost the server
wabut dangerous if the player enters the closet and kills himself, then the value is bugged or also if he leaves the game
Disable reset button
Hey codingableGnome, My prompt ain't appearing, what do i do?
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
I can hear gnomecode typing and his room😂
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
Doors for everyone!
So I used moveTo make a more realistic player placing insted of pivotto
Good evening GnomeCode
Can you show us how to make the hallways