Hi, in ScriptA I have
animal.GetComponent<Patrol>().**target2** = new Vector3(transform.position.x, 3.580481f, transform.position.z);
The animal Object that contains ScriptB calls this
transform.position = Vector3.MoveTowards(transform.position, **target2**.transform.position, Time.deltaTime);
I get the following error:
Type ‘UnityEngine.Vector3’ does not contain a definition for ‘transform’ and no extension method transform of type ‘UnityEngine.Vetor3’ could be found. . .
What am I doing wrong??