Part is not a valid member of Workspace "Workspace"

I have this camera manipulation part but whenever
I get this error the whole script just breaks

However, I tried it out on my test place and it seems to be working fine

image

Here’s the part of the code

local Camera = workspace.CurrentCamera

repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPart.CFrame
3 Likes

Either there is nothing named CameraPart in workspace or it just has not loaded yet. You can use :WaitForChild() for that.

Example: workspace:WaitForChild(“CameraPart”)

12 Likes

well, would you look at that!
it’s working now. Thanks!

4 Likes