How do i clamp gun recoil?

how do i clamp gun recoil? i am using Camera.CFrame = Camera.CFrame * CFrame.Angles(math.rad(0.1),0,0)

Im guessing you are doing this multiple times in a loop, and if so, you have to use the formula

totalDistanceRotationUpward = distanceRotationUpwardPerLoop * amountOfLoopIterations

If you want it to look nice and not choppy, use this function:

local function lerp(a, b, t)
    return a + (b - a) * t
end

print(lerp(1, 10, 0.5)) -- prints 5

i mean clamping the rotation of the recoil

Yep, that should do the trick :fire: