CurrentCam.CFrame not working

Hi Forum,

My intention is to change the CurrentCamera CFrame to a BasePart CFrame but it didn’t work. I’m pretty sure that this is the right solution down below but it didn’t work.

local Cam = workspace.CurrentCamera
local CameraViewCabin = workspace:WaitForChild("CratesCabin"):WaitForChild("Cam")

Cam.CameraType = "Scriptable"
Cam.CFrame = CameraViewCabin.CFrame

The BasePart is Anchored and Collision is set to false.

Nvm I found the problem. I used a function that set the CameraType to custom.