[FOUND THE ERROR] Attempt to Index nil with "Background" - Scripting error

Hello everyone!
I’m following along with PolarIsProgs PSX series, however. Im Having an error, i have provided you with some screenshots, Please help!

Output Error:


image

Perhaps the full GUI didn’t load yet when the script attempts to look for the requested object. Add a WaitForChild() and that should fix your issue.

1 Like

I have added a wait for child, However. The same issue occurs but it wont attempt to index nil with wait for child either.

I’m assuming the objects are not script-created. Put a wait() before the entire loop with 4 or more seconds (max 8) to make sure the items have enough time to load.

I don’t really have any other solutions

1 Like

you mean put a wait(4) before if drop:IsA() function?

Right after the Heartbeat event fires, before the entire loop begins. Insert it into a new line

1 Like

It still wont work. Idk what the issue could be. But im hoping i can fix it

Hey! I found the error,
I had the healthdisplay located in the wrong part on one of the drops, silly me!
Thank you for the help!

1 Like

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