title: Unity; Random Object Movement
body: <p>I am making a robot battling game where I want the enemy to randomly move and then sometimes travel towards the enemy. Code that I want the movement to be in.</p>
  
  <pre><code>else if (avoid == false)
          {
              transform.LookAt(target);
              transform.Translate(Vector3.forward * Time.deltaTime * movementSpeed);
              currentLerpTime = 0;
          }
  </code></pre>
  
  <p>This code just makes the AI move towards the player but I also want it occasionally to move in a random direction and then change direction occasionally. How would I do this?</p>