It's by design that a child inherits its parent's position, rotation, etc. That way a gun (child) can be pointed independently, but it will also change its direction if the player (parent) turns. The alternative would be to make them siblings in a parent container, where they could both work independently, but would both move/rotate with the container.
Regarding your specific problem with the "snap back and forth" when changing the rotation of your gun, you may be using degrees when your statement is expecting radians. Are you using
Also, make sure you aren't confusing
rotate (changes the rotation relative to the current rotation) with
set_rotd (sets the global rotation).