Problem with 2 player mirroring input

I’m having a bit of an issue with 2 player input. It’s my first time trying it, and I believe I got all the parts right, but something is still wrong.

I have 2 players on screen, all the movement controls are separate and work fine, but whenever I try to fire a player’s lazer it fires it on both players.

I have checked and double checked everything, there are no naming mistakes going on, everything is separate. This is the script which handles the instantiate of the lazer, for player 1:

var p1Lazer : GameObject;
var p1LazerGun : GameObject;

function Update (){
	if (Input.GetButtonDown("P1Lazer")){
		var p1NewLazer : GameObject = Instantiate(p1Lazer, transform.position, transform.rotation);
		p1NewLazer.transform.parent = p1LazerGun.transform;
	}
}

And for player 2:

var p2Lazer : GameObject;
var p2LazerGun : GameObject;

function Update (){
	if (Input.GetButtonDown("P2Lazer")){
		var p2NewLazer : GameObject = Instantiate(p2Lazer, transform.position, transform.rotation);
		p2NewLazer.transform.parent = p2LazerGun.transform;
	}
}

And as for the input settings:

alt text

For some reason it’s recognizing the joystick button input as the same for both controllers, while I have it listed on a separate controller in the input settings and I have given it different names. And I follow the same naming conventions for movement and that all works fine, but this does not. There is something wrong with that lazer instantiate script I believe (if I turn this script off on 1 player it does not fire the lazer on that player; it does on the other player). I have restarted Unity and my PC (so it’s not my PC still configuring the joysticks), also plugged the joysticks in and out more than once. Scripts are added to the gameobjects properly. Do you maybe have any idea what’s going on? It’s a mystery to me.

If it helps I could upload the project folder.

“Joystick Button X” means “Button #X on any joystick.”

“Joystick Y Button X” means “Button #X on Joystick #Y

The “Joystick Y” you’ve selected down below only applies to the axis inputs.

:science: