I found a solution. thanks for all you’re help
Here is the solution if u want to check it out:
--Services
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
-- Variables
local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera
local Turn = 0
-- Functions
local Lerp = function(a, b, t)
return a + (b - a) * t
end;
-- Main
LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson -- First Person
RunService:BindToRenderStep("CameraSway", Enum.RenderPriority.Camera.Value + 25, function(deltaTime)
local MouseDelta = UserInputService:GetMouseDelta()
Turn = Lerp(Turn, math.clamp(MouseDelta.X, -4, 3), (15 * deltaTime))
Camera.CFrame = Camera.CFrame * CFrame.Angles(0, 0, math.rad(Turn))
end)