title: problem in my enemy effect script not work with more than 1 in the same enemy
body: <p>I make effect for my enemy if the player is near to the enemy decrease the player speed its work fine but if there's one of the same enemies in the filed has the same script or work if there's more all of them are near to the player not work if there's more then one of the same enemy one near to the the player and the other not here's the question 
  how to make enemy does the effect if there's more then one of the same enemy that has the same effect and only one near the player or more ?
  here is my effect script </p>
  
  <pre><code>void Update () {
          if (Vector3.Distance (target.position, transform.position) &lt; 20) {
                  //    if the enemy near effect
               player.speed = 5f;
          } else {
               player.speed = 10f;
          }
  </code></pre>