How would I make my viewmodel visibly recoil?

Hey there! I just made a simple viewmodel gun system, but one thing I can’t get right is the gun recoil. With this I mean that the gun goes all over the place when firing, like this;

This is what I’ve tried so far:

local recoilCFrame = recoilSpring:update(deltaTime)
local gunRecoil = weapon.PrimaryPart.CFrame * CFrame.Angles(recoilCFrame.x, recoilCFrame.y, recoilCFrame.z)
local finalOffset = gripCFrame * aimCFrame * CF * gunRecoil

But it definitely doesn’t work.

Any help is greatly appreciated!