Script analysis can't detect child members of an object

I am trying to access a child of a folder using a script. I also have the script analysis open. However, during linting, I get a warning that says:

W000: (1,28) Key ‘ShipEvents’ not found in class ‘Folder’

When I look at the explorer, Ship Events is clearly a member of the folder, and intelisense even shows that it is a member. In fact, I can even print out Ship Events. This is what I wrote down:

inputEvents = script.Parent.ShipEvents -- warning
print(inputEvents) -- prints correctly

I think this is some type of bug as it only occurs with objects that are in the class folder, model, or script. The warnings are quite annoying since I’m accessing multiple folders through multiple scripts. If it is a bug, it needs to get fixed because a folder or a model seem like a very natural object to have child members.

Can you send a screenshot of your explorer tab?

image
I don’t think this will help much though. The script is camera script.

The warning seems to stop when I restarted studio.

Turn off the "Scripts Are Non-Strict By Default’ beta under File > Beta Features to fix this. This is a bug and has been reported.

Yes, but I want scripts to be non-strict by default. I think restarting studio is a better fix, but turning of non-strict mode by writing:

--!nocheck

didn’t seem to suppress the warning when I earlier tried it.