Simple camera manipulation not working?

Hello! I’m trying to make a simple loading screen just for practice. I want it to focus on the Baseplate. For some reason this does not work though:

--Local Script under StarterPlayerScripts
local cam = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
local FocusPart = game.Workspace.Baseplate	

cam.CameraType = "Fixed"
cam.Focus = FocusPart.CFrame

There are no errors in the output. Thank you!

You want to make the cameratype scriptable,

cam.CameraType = Enum.CameraType.Scriptable
3 Likes

Still doesn’t work:

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

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

Try using cam.CameraSubject = FocusPart.CFrame

2 Likes

Script:

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

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

Error: Players.GEILER123456.PlayerScripts.LocalScript:6: bad argument #3 (Object expected, got CFrame)

My bad, try a cam.CFrame = FocusPart.CFrame

2 Likes

Script:

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

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

No errors, it doesn’t do anything.

Perhaps it is running too quickly, so add in a wait:

local cam = game.Workspace.CurrentCamera
wait(0.001)
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = workspace.Baseplate.CFrame
3 Likes

Possibly add a Wait For Child in for the focus part?

1 Like

Yep, it was running too quickly. It works when I add in a wait, like Crrustyy said.

1 Like