title: Transform GameObject
body: <p>I am trying to make an Object move to a Cube wich is stored in an Array. </p>
  
  <p>The Array is filled with gameObjects with a tag. </p>
  
  <p>I can get the Object to move instantly to the cube, but not slowly like its walking to it. </p>
  
  <p>This is my script:</p>
  
  <pre class="lang-c# prettyprint-override"><code>var moveTo : GameObject;
  
  function Update(){
      print(FindClosestEnemy().name);
  }
  
  function FindClosestEnemy():GameObject{
  
      var chasePoints : GameObject[];
      chasePoints = GameObject.FindGameObjectsWithTag("chasePoint");
      var closest : GameObject;
      var distance = Mathf.Infinity;
      var position = transform.position;
  
      for(var go: GameObject in chasePoints){
          var diff = (go.transform.position-position);
          var curDistance = diff.sqrMagnitude;
          if(curDistance &lt; distance){
              closest = go;
              moveTo = closest;
              transform.position -= moveTo.transform.position;
              distance = curDistance;
          }
      }
      return closest; 
  }
  </code></pre>
  
  <p>I also tried the <code>Time.deltaTime</code> thing, but then it teleports far away from the cube. </p>
  
  <p>And just converting it to Transform Array isnt working out either :( Any ideas to make this work?</p>
  
  <p>Help is much appreciated :) Thanks in advance!</p>