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)