How To Give Dummy Bot Instructions

The code you gave me works ALMOST perfect, but with one exception- the Dummy Bot will continue to try to move toward the nearest player, even if said player has been eliminated. Is there an easy fix for this?