$ 0 0 Add Debug.Log(currentWaypoint); Debug.Log(sortedWaypoint[0].transform.position); after that line and tell me what you get