Camera is not a valid member of Workspace "Workspace"

Hello, i’m making a little cutscene for my game then for some reason i get this error

Here’s my script:

local currentcamera = workspace.CurrentCamera
local camera =
local player = game.Players.LocalPlayer
currentcamera.CameraType = Enum.CameraType.Scriptable
currentcamera.CFrame = camera.CFrame

Now, the problem is this script works for my other game but then i add this script to any other game it doesn’t work i get the error: camera is not a valid member of Workspace “Workspace”
And yes the part is in workspace


Try doing:

local camera = workspace:WaitForChild(“camera”)

Perhaps the part simply hasn’t loaded yet, so using WaitForChild() will wait for the camera to load in.


This has worked thank you.

Should’ve actually thought about it

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.