How do I make an AI that goes to the nearest player to damage that player?

I’m new to modd and i’m too lazy to figure it out.

yeah I’m too lazy too
well not really I’ve been here for a few months now(not Modd.io forum Modd.io)
I just don’t understand