My scripts seem to fail

Hey there!

I need assistance in figuring out why my script had failed to run and i have no idea what is the cause of it
it seems like there is an error that is not being displayed in my output yet my script fails to work.

Here is an example of my remote thing. : Screen Shot 2020-04-07 at 01.03.41

and here is an example of the script Screen Shot 2020-04-07 at 01.05.10 i wrote this script so that the ui i made could be able to open when this event occured yet it did not happen.

after a while of re-writing the script i saw this -

I am no expert but i tried to figure it out but couldn’t work my way through it now for some reason some of my other scripts are starting to fail which is really sad since i spent alot of time in this, if anyone can help i will be greatly happy.

Could you show us the code it is warning about?

Do not forget to add :WaitForChild() function.

1 Like

Without being able to see the script that’s actually erroring, it’s pretty hard to help you. The error just means that “Hats” isn’t a child of Player, so you’re indexxing a player with .Hats.

If you expect there to be something called “Hats” under the Player, check if it’s actually there in the explorer at run time. If so, use :WaitForChild in the LocalScript. If not, it’s an issue with whatever is putting “Hats” into the Player.

If you didn’t realize you were indexxing the Player, you have some other problem that can’t be fixed without seeing the code.

5 Likes