Attempt to index nil with 'intermission'

some reason i’m getting this error and now it won’t return my camera because intermission supposedly was deleted though it was just there
you can see the gui there then it disappears but it doesn’t return my camera to the player

2 Likes

Could you show some of the code around to where its erroring? Check if theres any code referencing intermission after its deleted (unless the deletion of it isn’t intentional)

image

Since you’re deleting intermission, setting the visible property doesn’t work. If you want to delete it then remove that line of code, but if you don’t want to delete it then remove the line of code somewhere in your code deleting it.

i don’t want it deleted, it just keeps saying Attempt to Index Nil and i want it to not say that

Make sure intermission is actually inside of the parent, or else another script is deleting it. Use the find all tool and try to search for any line of code changing the parent or destroying it.
image

i did that, some reason it just won’t accept that it is there and says that it isn’t.
i can have a wait for child and nothing to delete it and me see it’s there and it will say attempt to index nil

What’s inside the script that is triggering the event?


Look inside the player’s playergui folder before and when that happens and locate the intermission instance, if it dissapears then you should search in some of your scripts to see if anything else is interfering with it.

If its still there after the error happens, then that means that the intermission frame isn’t inside of MenuGUI and is somewhere else. Should look like this if the frame is inside MenuGUI (localscript being the one trying to change it to be visible)

image

i know it’s here and it doesn’t disappear when the glitch occurs

image
image

Make sure you are looking at the player’s gui and not the StarterGui, it is confusing sometimes

image

If you are and the error keeps occuring, show the first 4 lines of the script the error is happening in
(im guessing from the screenshots that intermission is the 4th line, unless its the 2nd one and not the 4th one)

Try printing both variables after those lines, and share what you saw in the console

Click on the red error and see if the script that is erroring is actually the one with that code, because what I’m seeing here is that there are 2 scripts, because it shouldn’t be printing anything after erroring.

Edit: Okay I went back and saw again some of the details, and there are definitely 2 scripts here. The initial video shows the output but you can also see that the frame gets hidden, which shouldn’t be happening if the script is erroring and since its clear that the frame isnt dissapearing or getting deleted it means that another script is hiding the frame and handling the ToggleMainMenu event seperately

Try doing intermission = gui:WaitForChild(“intermission”)

VERTICAL OUTPUT!?!?!? :fearful:

there is one script i checked 10 times and when i click the error it doesn’t send me to the error

i did it said Attempt to index nil with ‘WaitForChild’

vertical output… i got bored

oh wait, im stupid, that means gui doesn’t exist, not that intermission doesn’t

idk how script.Parent could be nil, but it apparently is…