So I will be calling a script component like so
var Cld: Colliding2 = transform.GetComponent(Colliding2);
but some times if it is an ai controlling it will look like this
var Cld: AI = transform.GetComponent(AI);
How would I make a var at the beginning of the script that is empty so I can do.
var Cld : component;
if (transform.GetComponent(Colliding2) != Null) {Cld = transform.GetComponent(Colliding2);}
if (transform.GetComponent(AI) != Null) {Cld = transform.GetComponent(AI);}