Hello everyone,
am sure this is a very ridiculous issue but i couldn’t figure out how to solve it,
#the objective is this ;
-when 2 prefabs collide, each one of them go to a random position
#how am i trying to do it ?
void OnTriggerEnter (Collider collider)
{
if (collider.gameObject.CompareTag (“stand_enemy”)) {
hit = true;
tmpTarget = new Vector3 (Random.Range (-10, 10), Random.Range (-5, 5), 0);
Debug.Log (gameObject.name + ": " + targetPosition);

		}
	}

so this is suppose to assign a random Vector3 to the tmpTarget variable, however in the Debug line, the result is the same for each 2 collided prefabs, i tried to do this but also same result :
gameObject.GetComponent ().tmpTarget = new Vector3 (Random.Range (-10, 10), Random.Range (-5, 5), 0);

thank you very much for your help,
have a nice day

UPDATE: Full class to better understand the problem :
UPDATE2: pastbin link for better visualization

Your debug will say:

targetPosition=Vector3.MoveTowards(targetPosition,shipControl.myTransform.position, speed * Time.deltaTime);

As the debug is inside an enter function which will only execute once on enter.
hit = true; and targetPosition gets updated but debug is not called again as the Collision function is not entered into again until next collision.

It should show differently after multiple enemy collisions.