Why won't my camera manipulation work?

Hiya.

I’m basically trying to get this basic code of camera manipulation to work.

At the moment this script won’t work whatsoever.

repeat wait(3) until game:IsLoaded()

local cam = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
local FocusPart = game.Workspace.Camera	

cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = FocusPart.CFrame 

No errors, or anything.

Does anybody have any ideas on what I can do to get this working?

My explorer:

image

IsLoaded will not work in StarterGui

This wont fix:

wait(10)

local cam = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
local FocusPart = game.Workspace.Camera	

cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = FocusPart.CFrame 

you can show the console please

image

1 - Requiring asset 6738245247
lol
2 - maybe is the name of the obj, because the game already has an object called “camera” and the code will count the primary objects (the important ones even if they don’t appear, like “camera”)

1 Like

another thing you can do is also change the CameraFocus because the object it looks at when starting the game is “Character”