If any instruction inside the Repeat fails (like Find Nearest Tree can't find a tree) it will quit out of the Repeat and continue the rest of the script.