Getting a weapon to follow the nearest enemy

How do I get my weapon to follow the nearest enemy?
Game

1 Like