How to get characters local rotation value?

Ok, so I finally got this working, kinda. It works very well if the player is not moving when it starts firing, but if the player for example alternates between pressing and holding left and right, the values fail.