Door game - Issue with spawning rooms

Hi, I’m Bear. I’m working on a door like game and I ran into a few issues.

  1. I want to achieve rooms spawning in one after another like doors.

  2. The issue is it only spawns one door even if it needs more. But it is for some reason unable to.

  3. I’ve tried looking on YouTube & The Developer Forum but can’t find anything to help.

I will reply with screenshots when I am home.

1 Like
  1. It’s impossible to help if you don’t provide any code
  2. I’m gonna guess that you are following gnome code’s tutorial so just rewatch it I guess?
    Or on the slim chance you just happen to be making a doors game right now, I would recommend going to GnomeCode’s channel (as he is making a full tutorial on doors)
1 Like

Yea I’m following his exact code; however it is having issues. I have rewatched it about 10 time, I have no luck. What should I do?

1 Like

Do you have any errors? It could be that you set up your rooms incorrectly, but your code is fine

1 Like

Yea I do have an error; would you mind if I sent you a screenshot in about an hour after my doctors checkup?

1 Like

Sure that’s fine

1 Like

Hey, sorry for the delay.

Here is the code:

Server:
image

Module:

This means that ‘prevRoom’ doesn’t exist. This is because you aren’t returning newRoom at the end of the room.Generate script, making the new ‘prevRoom’ equal to nil. So just add this at the end of the room.Generate function:

return newRoom

Oh my god, I am so dumb. Thank you!

2 Likes