Making everything but the door in a generated room completely black

What it does so far is, when you open a door that hasn’t been opened yet, it spawns a room from a list based on some algorithm. However, when you open the door, you can still see parts loading in. I tried fixing that by placing a black part in the doorway that deletes itself after .5 seconds, but you can’t see the door. I want the door to be visible but not anything in the room for the first .5 seconds after you open it. Something I could do is cover every single part in a highlight or selection box and set the surface color and transparency to 0, but I don’t think that would help much because it would cause a whole lot of lag in itself. I could also have it generate rooms in a 3x3 grid around any door you open, but I’m not looking for lag spikes or overloads in rooms. Any suggestions or ideas to fix this?

1 Like

So from what I under stand you want every part from the scene being loaded to be black and null like? You can set part material to neon and Color to black.

I want it to look like that for .5 seconds, so I don’t think I can just set everything to black and neon. I have some textures/decals too. Really what I would want is if I can just have the door show up through the black part.

Could you just wait on the door opening for the .5 seconds?

My honest recommendation is to start the loading in before the door even opens. It really sounds like Doors to me what you are doing right? Well, what they were doing is putting up a loop to load all parts in a way so it won’t bug out. The next room is loading before it’s door got opened.
Try something like this:

Parts = {Part1,Part2,Part3,...}
for _,v in Parts:GetChildren() do
v.Parent = workspace
wait()
end

Wouldn’t look very good. ----------

I think I will just load the rooms ahead of time in a 3x3 grid or, better, just a + shape. Thanks. Edit: Tried this and it worked pretty well.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.