How do I move an object from point A to point B with nearest way and change path outer collider

its move but i can not set path with collider

#pragma strict
  // drag the player here
var  speed:float = 5.0f; // move speed

function Start () {

}

function Update () {
 transform.position = Vector3.MoveTowards(transform.position, Vector3(32,15,-92), speed*Time.deltaTime);
 
}

That is called pathfinding. There are a lot of resources out there that could help you.

Rain indie could help you

A* Pathfinding etc…

Try to search before asking questions.