How to create a realistic recoil system that increases as you keep firing?

How do I make a realistic recoil system that will make your bullet’s spread more the longer you fire?

you’re likely calculating shots based off of mouse position. personally, I would have a recoil value that is added to with every shot, and then goes down after the player stops firing. using this recoil value, I would create an x and y offset that are randomized using math.random and add those offsets to the mouse position. ex: xOffset = math.random(-recoil.Value, recoil.Value) * 0.1. I multiply by 0.1 to get into decimals because the math.random function on it’s own only returns whole numbers.

1 Like