Hello people of the Devforum. Today while I was scripting a loading UI, I came across a error that I haven’t seen before (I’ve also just gotten into scripting so that could be why). Anyways I looked it up online but I didn’t see any information about it. So that’s why I am making this post.
The error pops up when I try and manipulate the normal camera, it says
MenuCamera is not a valid member of Workspace "Workspace"
Here it is pictured above
More information about the code is pictured above
The thing is, this code works on my separate testing place so I’m not sure why it doesn’t here. Anyways thanks!
I’m assuming this is a loading screen? Most likely the issue is this script executes before the game has finished loading so the instances in the workspace have not yet loaded.
Create your instance in that script instead of trying to reference the instance in the workspace.
You could but I wouldn’t recommend it since it doesn’t dynamically fit your loading time. Because this is a loading screen I wouldn’t even reference a part for the Camera’s position. Manually copy the CFrame of the menu part and assign the camera to that.