Why do my controls stop working after I build and run my game

I have a very simple script to fire a in a diagonal direction from my player from pressing two arrow keys and then space bar. I works perfectly fine in unity but when i build and then run the game it does not allow me to shoot diagonally any more
this is the code that tells which direction to send the bullet

if (Input.GetKey("right") && Input.GetKey("up")){
	firingDirection = Vector3(-1,0,1);
}
if (Input.GetKey("left") && Input.GetKey("down")){
	firingDirection = Vector3(-1,0,1);
}
if (Input.GetKey("right") && Input.GetKey("down")){
	firingDirection = Vector3(1,0,1);
}

Hey, how about using Input.GetAxis for this, instead? You only need to make one bit of script, and it’ll allow you to fire in any direction (unless you are intentionally limiting the directions the player can shoot in).