in my own fps project I use an empty which is parented to the gun. On mouse button down, I set the rotation of the empty to that of the gun + a random low value vector. This makes the weapon slightly inaccurate if I then do the raycast from the empty.
Then once the raycast is done (the first bullet is off) I rotate the weapon by say 5 degrees on the x axis (for me). I have a secondary FSM which then smoothly tries to interpolate the rotation back to 0/0/0 .
After that shot is done, and if the mouse button is still down, the next shot will go slightly up, because the secondary FSM didn't rotate the weapon fast enough to get back to 0/0/0 . Based on the current rotation the inaccuracy of my weapon also changes, so that you won't only shoot up but your individual bulletholes will also be farther apart.
Did that help?