Need Help With GetComponent(C#)

Hi there Guys,
im trying to get my script from one game object to another,
my first line is finding the script but the second one isnt.

Heres the Code

public Player1 p1;
public Player2 p2;

void Awake()
{
		player1 = GameObject.FindWithTag("Player1").transform;
		player2 = GameObject.FindWithTag("Player2").transform;
		p1 = GameObject.FindWithTag("Player1").GetComponent("Player1") as Player1;
		p2 = GameObject.FindWithTag("Player2").GetComponent("Player2") as Player2; 
}

so p1 is working and being found and p2 doesnt.
thanks in advance

Joshua

edit:
Also they both have a tag(correctly Spelled)

just dont no whats going on :confused:

You need to learn to debug your code!

Insert this line after line number 9.

Debug.Log ("This Player2 game object doesn't have the Player2 script.", player2);

Now hit play and you are going to get this message in you console. Select the message and it will highlight the game object from the Player2 tag that was found but doesn’t contain the script.

thanks i do use debug but i managed to fix it by changing a few spelling
Thanks for the reply

Joshua