So I have two players you can be two separate GameObjects with the exact same script attached to them.
The problem is that I cant get this to find whichever object is active it only ever finds the first created one.
private Player thePlayer; //the reference to the Player script
void Start(){
thePlayer = FindObjectOfType<Player>();
}
The thing is I can’t make thePlayer an cause if do I can’t seem to reference anything in the script which is the whole purpose of referencing said script so if someone could tell me how to only find the Active object with this type of thing that would be very helpful.