canFire = true
function DoRecoilY()
-- Code for recoil would be placed in here with waits.
end
function Shoot()
--Code for shooting a gun would be placed in here.
end
mouse.Button1Down:connect(function()
if canFire == true then
canFire = false
Shoot()
wait(FireRate)
canFire = true
end
end)
Since DoRecoilY has waits in it it would delay how fast you can shoot. I've heard of something called coroutines but I have no idea how to implement them into this. I've looked at the wiki but I'm a little confused.

2 comments
The recoil could just be an Animation
The recoil just moves the camera, not the arms.