Log in to vote

Why does my camera script using CFrame not work when I test it out?

Asked by 1 month ago

I recently learned how to move cameras with TheDevKing but he didn't explain how to move a camera using CFrame so I tried to do it myself with the help of the roblox DevHub but it didn't work. Is there any error in my script that I need to change? The output showed no error. Thank you in advance.


local cam = game.Workspace.CurrentCamera

local pos =, 100, 0)
local lookAt =, 0, 0)
local CameraCFrame =, lookAt)
cam.CFrame = CameraCFrame

1 answer

Log in to vote
Answered by 1 month ago
Edited 1 month ago

Set the camera type to scriptable.

cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = CameraFrame

CameraType API Reference


Answer this question