How to rotate a Camera's CFrame by an additional 135 degrees clockwise?

The code below is used to position and orient a camera during a cutscene. However, regardless of CamPart’s orientation, or the number I put inside the math.rad() functions, the camera is always oriented 135 degrees away from the desired position. How do I fix this?

cam.CameraType = "Scriptable"
local targetcam = script.Parent.CamPart
local position = targetcam.Position
local target = targetcam.Position + targetcam.CFrame.lookVector
cam.CFrame = CFrame.lookAt(position, Vector3.new(math.rad(180),math.rad(180),0))		

Hey there!

There are multiple ways to go about this. If your targetcam part is facing the desired direction already, you can simply just call:

cam.CFrame = targetcam.CFrame

However, if you want to orient the camera based on the targetcam part’s position, you could multiply a CFrame to the targetcam CFrame:

cam.CFrame = targetcam.CFrame * CFrame.Angles(0, math.pi, 0) -- Rotates 180 clockwise

I hope this helps!