The ants walk in a straight line because they follow the scent the leader left behind. Once the ants find food and head back to the nest, they will lay down another trail of pheromones, allowing others to pick up their scent and follow the same route.