How do i rotate this CFrame by 180?

I have this smooth camera script that I found on the devforum. For some reason it wont let me rotate the camera with CFrame.Angles(). Can someone explain why I cant rotate it?

local run = game:GetService("RunService")
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(0.1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0, false, 0)
local ti2 = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0)
local Cam = game.Workspace.CurrentCamera
local uis = game:GetService("UserInputService")
local ct = nil
local mult = 180/math.pi
local clamp = math.clamp
local current = Vector2.zero
local targetX, targetY = 0, 0
local speed = 4 -- Set the speed of the animation
local sensitivity = .8 -- Set the sensitivity of the rotation
local releaseDecel = 40 -- Set how much it slows down when you release

Cam.CameraType = Enum.CameraType.Scriptable

local spin = false

uis.MouseDeltaSensitivity = 0.01
local mult1 = 1
local connection = run:BindToRenderStep("SmoothCam", Enum.RenderPriority.Camera.Value-1, function(dt)
   
   local CURRENTPOS = Cam.CFrame
   local delta = uis:GetMouseDelta()*sensitivity*100
   targetX += delta.X
   targetY = clamp(targetY+delta.Y,-90,90)
   current = current:Lerp(Vector2.new(targetX,targetY), dt*speed)
   local pos = CFrame.fromOrientation(-current.Y/mult,-current.X/mult,0) 
   local new =  CFrame.fromOrientation(-current.Y/mult,-current.X/mult,0) 

   Cam.CFrame = new  

end)

Where are you trying to rotate by 180? What is this code even trying to do? You might be better off re-writing it completely to be cleaner and easier to understand.

Try use
Cam.CFame = Cam.CFrame * CFrame.FromEulerAnglesxyz(0,math.rad(180),0)
:smile:

Yeah that would work, it simply rotates a CFrame by 180 degrees.

And to note, you can also use *= to simplify the expression. Something like this:

Cam.CFrame *= CFrame.FromEulerAnglesXYZ(0,math.rad(180),0)