Awesome! You actually gave me a great way on generating rooms in your first video and saw this video on my recommendeds. Cool to see you making a new a project and helping other people GnomeCode =D
Remember that CFrame can really mess you up with door placement, it can get your door in the wrong orientation and you will have to redo all the exits and entrances all over again. so make sure that the door has the SAME orientation as the exits and entrances. but you still have to rotate when its a right or left turn. I hope this helps people
This series looking good so far! I’m excited to see how the entities work. I’m VERY new to scripting and I’m working on a disaster game. I know the commands and how they work, but that’s it. But not when to start a new line or when to add things like bool and intvalue. Time to watch your roblox studio series!
Hey GnomeCode, could you please post more often? I bet that if you did, then everyone would start watching you, since right now there aren't really good doors tutorials yet, and I know that you probably be the only one who will make a good tutorial. ik that you're good at this stuff, but others who don't know you probably aren't. overall, you'd probably get many more subscribers and views if you post more often! hope you get to 69420 subs!!!
on the *Door.Open(doorModel)* function I recommend adding this after you play the tween so that the player doesn't bump into the door *for i, part in pairs(doorModel:GetDescendants()) do* -- Loops through every descendant of the door *if part:IsA("BasePart") then* -- Makes sure that the part we found is a physical object *part.CanCollide = false* -- Disables collision *end* *end*
the hiding system is simple. i dont really know how to script it yet but i know how its made in the orginal game. while hiding a hiding animation will play.. but thats not all. you will be set to a team which makes you so rush's and ambush's hitbox will not kill you. when you go out of the hiding spot.. then you will be set to the normal team.
@@ItzJustTeam Teams wouldn't be used it's more likely a simple attribute called 'Hiding' or something, then just setting it to true / false and checking that when the monster touches you.
Why do two rooms spawn on my start room? I have a corner room and a long room and together, they look really weird and make it so I can't progress any further.
In the door.New function you could have instead just done: local formattedNumber = string.format("%04d", tonumber(number)) doorModel.Door.Sign.SurfaceGui.TextLabel.Text = formattedNumber
For some reason when i write the Door ModuleScript it just breaks the entire thing and the rooms don’t load anymore. I decided to delete the entire script and pay attention very closely while rewatching the tutorial, but I got the same result (please help)
Never made a game, let alone code one, and here I am watching this for some odd reason. Also I think you should probably do a tutorial on how to make previous rooms despawn if you've already went through them.
I think he should do things such as: Proper Starting Room The puzzles and locked doors (because some doors in Doors are locked and you need a key) Those two things, in my opinion is what I would do before implementing hiding or anything like that.
Idk if my other reply got sent but basically he'll probably make it exactly the same except he'll make different designs for the entities. In his piggy game tutorial, he made Piggy a teddy bear.
Here are my suggestions for future episodes, Dark rooms with the fog effect Rush AI (there are a lot of tutorials but I dunno how it would work with random generation) plus hiding mechanic Specific locations spawning in specific rooms (like room 50 being library and 100 being elevator room) Jumpscares with Death screens
What I think he should do next episode: - Proper Starting Room - Keys and doors that have a chance for being locked. - Some other occasional decorations that can spawn so it doesn't feel like the same thing over and over and over again Then the episode after that: - Implement crouching and the chance for a room that needs you to crouch to get through it - Implement the wardrobe/hiding - Possibly start with the basis of monster AI I think he should just add the monsters and hiding later off in the game rather than NOW.
Honestly I would have ten rooms loaded at once, and as you go forward, more rooms are generated and rooms behind you are de-generated. Right now it's not causing much lag, but he hasn't even added much of the gameplay yet; which would eventually cause lag
Are you able to make 5 rooms spawn if the door gets open to avoid lag and if rooms collide with each other it’ll delete the room that it collided with and a entity like glitch will spawn
There's an easier way of doing the leading zeroes: doorModel.Sign.SurfaceGui.TextLabel.Text= string.format("%0.3i", number) (the 3 means there are 3 numbers in total, you can easily change it to your liking)
He most likely did this to avoid confusion. Most people who are watching this are VERY new to scripting or are at maximum intermediate. I had no idea what the hecc you just typed and Gnomecode maybe doesn't too.
Why is my door spawning sideways? How do I fix it? edit: I remade the whole door and spawn script and now its spawning more to the right, what do I do? edit2: I remade the whole door model and spawn script again and now it works 😌😌😌
Honestly I know how to script most things, my main reason I'm here is for 'Eyes' to learn look vectors. And how to do damage to people looking at certain objects.
Hello, I had a problem on part 2 where, the rooms still go into each other, and in some cases the small room goes in backwards, i checked everything possible that could make this happen. any fix to it?
its probably because either your rooms are too big for example the outer part of the room like the walls are sticking farther out the room then they are suppose to our u didnt make the entrance and exit part in the right spot the entrance should be 2 studs from the platform and the exit directly on the edge of the platform still being on the platform.
i have gone trought the doornumberscript about 5 times, and it didnt work, but at the 5. or whatever i spottet something i thought shouldnt be there but had to, plus i found a bug where i for some reason had copy and pasted the generate thing so it Z fights. you are definitly underated!
i acctually think i made an uhh okay fix local door = {} function door.Open(doorModel) doorModel:SetAttribute("Open", true)
local cframe = doorModel.Hinge.CFrame * CFrame.Angles(0, math.rad(-95), 0) local doorTween = TweenService:Create(doorModel.Hinge, TweenInfo.new(0.5), {CFrame = cframe})
doorTween:Play() doorModel.Door.Open:play() end local savedNumber = 0 function door.New(roomModel, number) local doorModel = workspace.MainDoor:Clone()
if number == nil then number = savedNumber + 1 doorModel.Door.Transparency = 1 doorModel.sign.Transparency = 1 doorModel.Door.Knob.Transparency = 1 doorModel.Door.Plate.Transparency = 1 doorModel.Sign.Stinker.Text = savedNumber doorModel.Sign.Stinker.Highlight.Text = savedNumber doorModel.Sign.Stinker.Shadow.Text = savedNumber -- end--for testing purposes only doorModel:PivotTo(roomModel.RoomEnd.CFrame) doorModel:SetAttribute("Open", false)
if number < 10 then number = "00" ..number elseif number < 100 then number = "0" ..number end doorModel.Sign.Stinker.Text = number doorModel.Sign.Stinker.Highlight.Text = number doorModel.Sign.Stinker.Shadow.Text = number print(number) print(savedNumber) local savedNumber = number
doorModel.Sensor.Touched:Connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid and doorModel:GetAttribute("Open") == false then door.Open(doorModel) end end)
doorModel.Parent = roomModel
return doorModel end return door i have in the sign like a shadow and highlight and stuff like that so you cant just copy and paste it
The part called 'Door' in the door model clones on the actual door model instead of the generated doors in the rooms (basically the doors arent spawning where they need to) i need help pls
Whenever I run the game, two rooms spawn at the start room which can lead to the next room being blocked off by the double rooms that spawned after the start room. Please help me!!!
I would go back and check line for line on the video to make sure the code is correct, because especially in coding, missing by a single letter or number can mess up everything.
I think ik how to fix this go into your server script and delete the room.generate() function cause you might have the room.generate() function in your code twice that is how i fixed it
I like how he kept the old start room forever lol
It's iconic!
lol
@@GnomeCode lol
@@GnomeCode if you ever gonna release this game keep it with a gray cube with a bell on it
@@GnomeCode It's the best starting room I've ever seen xD
If gnomecode and griffpatch got together, they would be unstoppable.
they will be unstoppable
I love this series so far! Keep making new episodes
How did u comment 12 hours ago?
@@alvaro-sf7kg the vid was unlisted
Awesome! You actually gave me a great way on generating rooms in your first video and saw this video on my recommendeds. Cool to see you making a new a project and helping other people GnomeCode =D
Yea
FINALLY
ANOTHER TUTORIAL, ONE MORE STEP TOWARDS GREATNESS
WHAT DO YOU MEAN MY DOOR NOT PLAY
Amazing series my friend!
Excited to see how the entities are gonna look like.
Keep up the good work!
Check out:
#6 - Hiding in closets: ruclips.net/video/EV6Hjp1DcOk/видео.html
#7 Making Rush Monster AI: ruclips.net/video/fDIIv-XZbVY/видео.html
Remember that CFrame can really mess you up with door placement, it can get your door in the wrong orientation and you will have to redo all the exits and entrances all over again.
so make sure that the door has the SAME orientation as the exits and entrances. but you still have to rotate when its a right or left turn. I hope this helps people
i did what you said but it still doesnt work
ouch
so i just welded it all and made it so it teleports the main part thats welded to every other part
nah dude i got the door in the wrong orientation
literally got my door in the wrong position and orientation, how to fix pls
YES ITS OUT!! I was so excited for this!
Same!
Why was this unlisted?! I’ve been searching for ages! You’re doing amazing!
It was because he was doing something with it
Im So Exited For The Next Episode, I Hope It's Aboyt Hiding Places
This series looking good so far! I’m excited to see how the entities work. I’m VERY new to scripting and I’m working on a disaster game. I know the commands and how they work, but that’s it. But not when to start a new line or when to add things like bool and intvalue. Time to watch your roblox studio series!
I like the fact that you're explaining what to do and then you just have gaps lol, also CONGRATS ON 69K SUBS!
great..
I absolutely love your videos gnome they've always helped me with a lot of my games keep up the good work
Amazing video as always! Keep up the great work ❤
Please could you cover how to make room events that aren't generated and always happen at a certain time?
i have been waiting for this episode
THE BEST!
Hey GnomeCode, could you please post more often? I bet that if you did, then everyone would start watching you, since right now there aren't really good doors tutorials yet, and I know that you probably be the only one who will make a good tutorial. ik that you're good at this stuff, but others who don't know you probably aren't.
overall, you'd probably get many more subscribers and views if you post more often!
hope you get to 69420 subs!!!
…nice sub number
sus
how do I make it so instead of all the rooms generating at once it only generates 1 every time u open a door
(in the for loop halt with and if statement and if door is opened then generate) somet like this
Nice tutorial man! I like how you work so well, making these tutorial videos!!! you deserve 1 Million subscribers
on the *Door.Open(doorModel)* function I recommend adding this after you play the tween so that the player doesn't bump into the door
*for i, part in pairs(doorModel:GetDescendants()) do* -- Loops through every descendant of the door
*if part:IsA("BasePart") then* -- Makes sure that the part we found is a physical object
*part.CanCollide = false* -- Disables collision
*end*
*end*
Na Im fine.
I made it fine by extending the sensor part
What about disabling cancollide
@@andy-gamer thats literally what it does
@@nineleaffbut why not just disable cancollide on your door model instead of a script
I'm looking forward to seeing how the hiding system will be implemented and how it will affect the entities ai's.
the hiding system is simple. i dont really know how to script it yet but i know how its made in the orginal game. while hiding a hiding animation will play.. but thats not all. you will be set to a team which makes you so rush's and ambush's hitbox will not kill you. when you go out of the hiding spot.. then you will be set to the normal team.
@@ItzJustTeam Teams wouldn't be used it's more likely a simple attribute called 'Hiding' or something, then just setting it to true / false and checking that when the monster touches you.
@@ItzJustTeam hmm if you hide and you would be set to another team (which isnt true) then how can you hide behind objects?
Quick question, how can i fix the doors not appearing after i wrote that door.Open function?
in the tween service i cant see the rest of the script pls make your screen bigger
I haved this problem too, you just need to go to 16:09 of the video, or just put CFrame = cframe
i started creating my new game using this series thank u so much
Finally i've been waiting for this!!!
your older videos helped me so much that i was able to add in doors a few days before this video came out
Hey your back amazing tutorial again im having so much fun making it cant wait for the Ai part for entities
Done: amazing series
finally part 3! cant wait for part 4 haha!
I have a problem.. The door is in the wrong rotation when spawning. it spawns in every room just in the wrong orientation.. how do i fix this?
Instead of putting CFrame.Angles(0, math.rad(100),0)
Change this part of code from door.Open() to:
CFrame.Angles(0, math.rad(-100),0)
Make sure your door model’s primary part is set to Primary (a part you put in the door)
@@CR7_Next thanks bro, helped me alot
Why do two rooms spawn on my start room? I have a corner room and a long room and together, they look really weird and make it so I can't progress any further.
Maybe make a movement system like Door's a custom one so it feels more realistic and fun
Hey Gnome! I was just wondering if you could upload the models as assets even so that I can use them as a reference as I am struggling with CFrames!
Wow you are goodest scripter ever i seen you are very cool thank you i appriciate it :D
Another great video by the gnome!
In the door.New function you could have instead just done:
local formattedNumber = string.format("%04d", tonumber(number))
doorModel.Door.Sign.SurfaceGui.TextLabel.Text = formattedNumber
For some reason when i write the Door ModuleScript it just breaks the entire thing and the rooms don’t load anymore. I decided to delete the entire script and pay attention very closely while rewatching the tutorial, but I got the same result (please help)
Never made a game, let alone code one, and here I am watching this for some odd reason. Also I think you should probably do a tutorial on how to make previous rooms despawn if you've already went through them.
wait
continue
thanks! now im waiting 4th video, and rush/ambush system :)))
(im subscribed! =)... )
I think he should do things such as:
Proper Starting Room
The puzzles and locked doors (because some doors in Doors are locked and you need a key)
Those two things, in my opinion is what I would do before implementing hiding or anything like that.
Finally we have waited for a new tutorial!
I need help because my door won’t open for some reason??? Could you give me a list of stuff that I can check to resolve this problem?
I’m having that problem too!
@@maemgi1312 and also my rooms won’t generate anymore
me too
@@riadabdeddine1109 yeah it’s been a year and I gave up for short lmao. i have been doing different doors testing games though
Please help. When i try to do the number script it wont generate any of the rooms. Idk why no errors so what?
How accurate are you planning to go with this? Will things like the exact entities, dark rooms or room 50, 100 and the seek chases be included?
Idk if my other reply got sent but basically he'll probably make it exactly the same except he'll make different designs for the entities. In his piggy game tutorial, he made Piggy a teddy bear.
@@MaxGamerFun oh cool!
I honestly would want a little of both tbh. Maybe add the monsters from the actual game but also add his own monsters.
@@PersonianOld that would be against lsplash
@@PersonianOld bro you know that, if you take assets from doors, lsplash will smack your ass....
Here are my suggestions for future episodes,
Dark rooms with the fog effect
Rush AI (there are a lot of tutorials but I dunno how it would work with random generation) plus hiding mechanic
Specific locations spawning in specific rooms (like room 50 being library and 100 being elevator room)
Jumpscares with Death screens
prob have parts that show where rush can go in room
What I think he should do next episode:
- Proper Starting Room
- Keys and doors that have a chance for being locked.
- Some other occasional decorations that can spawn so it doesn't feel like the same thing over and over and over again
Then the episode after that:
- Implement crouching and the chance for a room that needs you to crouch to get through it
- Implement the wardrobe/hiding
- Possibly start with the basis of monster AI
I think he should just add the monsters and hiding later off in the game rather than NOW.
well, we are in the generation phase so i think it will take a while...
@@PersonianOld the proper start room will never exist. its iconic
@Animator well some rooms would have them but some wouldn’t
Yay it’s here!
Do you think you can release the rooms you made (no code, just the models) as a sort of pack to speed up testing and dev?
thank you so much! i was making rooms game with my friend I mean friend make that game and this ep1 to ep7 help me a lot
im also making a rooms game!
I cant wait for the stuff coming in the next episode!
Series very good so far
can't wait to see the item system, :D
finnaly a new good episode
can't wait for part two: "locked doors"
Yayyyy, guess who earned another subscriber
the door did not open for me, can you please share the door in toolbox?
do you mind remaking the TD tutorials? I tried to use it but the enemy would not turn at all.
(It would go to the first point, but then just stop.)
I wanna say that for formatting numbers you could use string.format() function since its easier to use
I'm not sure how that would avoid using an if statement
@@GnomeCode just use
doorModel.Sign.SurfaceGui.TextLabel.Text = string.format("%0.3i", number)
good luck with series
What about doors that don't lead to the next room but are just a part of the room? like a room with multiple doors that open?
ive been wondering
how does doors do that
just make a room with a doors models. thats it
@@sharky_obby-creator the doors assets got hacked into the tool box so no
@@sharky_obby-creator Yeah, I did that. Thanks tho
@@godzil7 bruh. By doors, i mean actual freakin door model
when i started making the script to make the doors open, the rooms stopped spawning and i cant fix it
I like how he assumes we are all gnomes even though I'm a corrupted freak lol
hey i have a question why does it say
ServerScriptService.Server.Room.Door:22: attempt to compare nil < number - Server - Door:22
Check your missing room name in folder "Rooms". I had the same problem and this is solution for me
thanks for the help it help my every thing i need to install
Are you going to do loading and unloading of rooms, as having 100+ rooms loaded at once isnt the best idea for performance
Honestly I would have ten rooms loaded at once, and as you go forward, more rooms are generated and rooms behind you are de-generated.
Right now it's not causing much lag, but he hasn't even added much of the gameplay yet; which would eventually cause lag
Someone please count how many times he has said 'door' in this episode, or even in the series 😂
error saying: Unable to assign property Text. string expected, got nil - Server - Door:19 please help
Are you able to make 5 rooms spawn if the door gets open to avoid lag and if rooms collide with each other it’ll delete the room that it collided with and a entity like glitch will spawn
I would do ten or fifteen doors at a time
@@PersonianOld that would glitch the game very laggy
FINALLY HE MADE A PART 3 VIDEO
There's an easier way of doing the leading zeroes:
doorModel.Sign.SurfaceGui.TextLabel.Text= string.format("%0.3i", number)
(the 3 means there are 3 numbers in total, you can easily change it to your liking)
he made the zeroes
@@goose9955 This way is both faster and easier though
I edited the comment because it was pretty useless before, thanks for pointing it out!
@@robertmcbomb7116 no problem
i love being gnome
Me: **Gets the door rotation correctly first try**
GnomeCode in the video: 15:57
Noice Bro, like i made my own doors game thinks alot
Great Tutorial!
Umm at 15:35 should there be more code after the {CFrame} cuz I can’t zoom that far
Nvm I found out there was more
suggestion, In doors, they have a feature where at rooms 50 and 100, the rooms that are not randomized, how do we do that?
if room.Generate(number) = 50 then
local library = workspace.Library
room.Generate(library)
end
@SuperDuper2607 but what script i place this
@@superduper2607 cool! BUT! in which script do i put it in and what area?!
quick tip, instead of doing "if number < 10 then number = "00" .. number end" you can do string.format("%0.4i", number)
He most likely did this to avoid confusion. Most people who are watching this are VERY new to scripting or are at maximum intermediate. I had no idea what the hecc you just typed and Gnomecode maybe doesn't too.
thank you so much dude you're a god
Why is my door spawning sideways? How do I fix it?
edit: I remade the whole door and spawn script and now its spawning more to the right, what do I do?
edit2: I remade the whole door model and spawn script again and now it works 😌😌😌
How
@@greggreg126 How it didn't work or how I fixed it?
@@deta7914 yes, its happening to me lol
how do I fix it?
bruh guys, just put the primaryPart of the Door model as the "Primary" part in the model that he showed
Gnome code is the best
Honestly I know how to script most things, my main reason I'm here is for 'Eyes' to learn look vectors. And how to do damage to people looking at certain objects.
Gnomecode I am having trouble with opening doors, if you could help me it would be amazing!
Why is it unlisted?
Keep it up bro!!
Gnoem code thank you so much for uploading (0:
Hello, I had a problem on part 2 where, the rooms still go into each other, and in some cases the small room goes in backwards, i checked everything possible that could make this happen. any fix to it?
its probably because either your rooms are too big for example the outer part of the room like the walls are sticking farther out the room then they are suppose to our u didnt make the entrance and exit part in the right spot the entrance should be 2 studs from the platform and the exit directly on the edge of the platform still being on the platform.
GOOD WORK :D
YEAH!
i have gone trought the doornumberscript about 5 times, and it didnt work, but at the 5. or whatever i spottet something i thought shouldnt be there but had to, plus i found a bug where i for some reason had copy and pasted the generate thing so it Z fights. you are definitly underated!
Do you do this as you go? Or do you have some sort of script you follow with errors to help teach us?
I do each episode as I go, so I can read the comments each time
@@GnomeCode clever
@@GnomeCode indeeeeed
Gnome Code, if you want you can create new map for game called "Teddy". Its Library.
I just love this (btw scp)
Wow you the best!Thanks for tutorial!
I'm hoping that you will add specific room generation like door 50.
He probably will. But he is still in the early phases, so we'll just have to see, I guess.
Unable to assign property Text. string expected, got nil
what do I do
Same
i got ServerScriptService.Server.Room.Door:22: attempt to compare nil < number - Server - Door:22
i acctually think i made an uhh okay fix
local door = {}
function door.Open(doorModel)
doorModel:SetAttribute("Open", true)
local cframe = doorModel.Hinge.CFrame * CFrame.Angles(0, math.rad(-95), 0)
local doorTween = TweenService:Create(doorModel.Hinge, TweenInfo.new(0.5), {CFrame = cframe})
doorTween:Play()
doorModel.Door.Open:play()
end
local savedNumber = 0
function door.New(roomModel, number)
local doorModel = workspace.MainDoor:Clone()
if number == nil then
number = savedNumber + 1
doorModel.Door.Transparency = 1
doorModel.sign.Transparency = 1
doorModel.Door.Knob.Transparency = 1
doorModel.Door.Plate.Transparency = 1
doorModel.Sign.Stinker.Text = savedNumber
doorModel.Sign.Stinker.Highlight.Text = savedNumber
doorModel.Sign.Stinker.Shadow.Text = savedNumber
--
end--for testing purposes only
doorModel:PivotTo(roomModel.RoomEnd.CFrame)
doorModel:SetAttribute("Open", false)
if number < 10 then
number = "00" ..number
elseif number < 100 then
number = "0" ..number
end
doorModel.Sign.Stinker.Text = number
doorModel.Sign.Stinker.Highlight.Text = number
doorModel.Sign.Stinker.Shadow.Text = number
print(number)
print(savedNumber)
local savedNumber = number
doorModel.Sensor.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid and doorModel:GetAttribute("Open") == false then
door.Open(doorModel)
end
end)
doorModel.Parent = roomModel
return doorModel
end
return door
i have in the sign like a shadow and highlight and stuff like that so you cant just copy and paste it
@@mido_mayadoo OH MY GOD THANK YOU
The part called 'Door' in the door model clones on the actual door model instead of the generated doors in the rooms (basically the doors arent spawning where they need to) i need help pls
I did all the code right and no rooms are generating I think its something in the RoomInfo script but IDK
same here
it might be a roblox issue because of the updates
@@SlapBattlesReports-y5q nope, its his own errors as i have it working.
Whenever I run the game, two rooms spawn at the start room which can lead to the next room being blocked off by the double rooms that spawned after the start room. Please help me!!!
I would go back and check line for line on the video to make sure the code is correct, because especially in coding, missing by a single letter or number can mess up everything.
@@PersonianOld Yes it can be very tedious . Thank you
I think ik how to fix this go into your server script and delete the room.generate() function cause you might have the room.generate() function in your code twice that is how i fixed it
Gnome, thanks for the doors video! I can make this game :D
Very cool series (im Kit), even tho my pc got hacked and I can't log into my mails I'll definetely work with series when I get everything settled
Such a helpful video, thanks!! P.S: Will you make this game open source when it’s done so that we can use it for our own purposes?
Alright Gnomecode,
is it fine that I add the doors inside the rooms first and fire a remoteevent when something needs to happen
Woo actual doors! 🚪
Can you make a video on how to make the rooms spawn when a door opens so it doesn’t lag if you spawn 100 rooms at once