Ai Melee attack?

Hey guys, I’ve been trying to find a good tutorials on having the Ai attack because the way I do it is pretty dumb and buggy… I use Collision overlap… Which is pretty stupid haha. So I’m trying to learn a better way. Can anyone point me in the directions of a good tutorial where I can learn about it. I don’t care if it’s a video or a article, or any tips on what direction I could go with it. Thanks again for all you’re help!.