Can't run and shoot in 2D game!!

I have a problem with my 2D character, i made my character to shoot projectile but it doesn’t shoot while walking but I can shoot while jumping or crouching or crouch walking. Also it doesn’t work when I jump to the left or right only if I jump straight upward.