"Not a Valid Member" Error

Hello, I have a Remote Event that when fired, the camera does a scene moving from brick to brick.

The issue is in all my scripts, whenever I type “workspace.whatever” It doesn’t locate it, I have this script that works when the Remote Event is fired: image

And whenever I test, in the output it says that “nickicam is not a valid member of the Script”.

I’ve tried using “:FindFirstChild()”, checking if the models are in workspace, but anything works and I would love if someone knows why this error could be happening:
image
By the way, it used to work it just randomly stopped working after saving.

If someone has any idea on how to fix it, or why is the error appearing, tell me plz :grin:

1 Like

Are you sure

workspace.shinys.nickicam

is a valid member of workspace?

1 Like

I guess the problem is that you are trying to acess stuff that hasn’t fully loaded. Try using :WaitForChild() instead.

5 Likes

Can you explain what “shinys” and “nickicam” are?

1 Like

there’s probably another object named shinys, which is a script

1 Like

do game.workspace. not just workspace that may fix the problem and maybe use WaitForChild?

i’ve tried that and also waitforchild, its just my scripts are unable to detect anything from workspace and they used to

no, there isn’t any, it’s just a single one and it’s well located, it used to work

shinys is a model in workspace and shinys is a brick inside the model that does as camera

wdym fully loaded? i’ve tried that too and it hasn’t worked, do i need to wait for it to work?

yeah it totally is! and it used to work

Can we see your workspace? That usually doesn’t throw that error if you located your object properly.

oh my workspace is empty! but i have a command that copies the whole shinys model from replicatedstorage to workspace, and then when its transported, its supposed to work like with other similar scripts i’ve made

If you copying or cloning it, you should wait for the object to exist, perhaps it might have been running before the model is in workspace, resulting in an error.

However your issue seems a bit different. It’s saying that your model is not a valid member of Script?

Have you got StreamingEnabled turned on in workspace’s properties?

Also, it should be .OnClientEvent, with a capital “O”.