This is my current code:
function recoil() local x = math.random(-gunData.recoil.x*100,gunData.recoil.x*100)/100 local y = math.random(0,gunData.recoil.y*100)/100 game.Workspace.CurrentCamera.CFrame = game.Workspace.CurrentCamera.CFrame * CFrame.Angles(math.rad(1)*y,math.rad(1)*x,0) end
This works pretty well, however the camera feels "jolty" and "clunky", is there a way to maybe lerp the cameras rotation without changing the CameraType to scriptable?