Transition from Camera Types?

Hello, You may have noticed currently if you switch from Camera Type Scriptable to Camera Type Custom, it just snaps to the Camera Subject, but I am trying to make it transition to the Camera Subject instead of instantly clicking.

I have tried lerping and tweening, but there are obviously bugs such as after finishing the lerp, and then changing the camera Type would also make it click, it may be small but it is still noticible.

Here is an example code below, its not what I have in game.

sorry for code bugs, Roblox Dev forums editor is kinda broken.

local Camera = workspace.CurrentCamera

-- just making it Scriptable first
repeat wait()
       Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable

Camera.CFrame = CFrame.new(Vector3.new(0,10,0))

wait(5);

-- the code below instantly snaps to the character instead of transitioning smoothly.
repeat wait()
       Camera.CameraType = Enum.CameraType.Custom
until Camera.CameraType == Enum.CameraType.Custom

You can keep it as Enum.CameraType.Scriptable and tween it back to the CFrame of Enum.CameraType.Custom.

I said this as one of my solutions, but if you didn’t read here it is.

“I have tried lerping and tweening, but there are obviously bugs such as after finishing the lerp, and then changing the camera Type would also make it click, it may be small but it is still noticible.”

I’ve used this method for a while and I’ve never noticed this. Could you provide the code you used?