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 ![]()