Ai Bot Shoot

Hi I’m trying to make an ai that can fire at the player please help I am a learner so I don’t know much about the engine yet still getting the hang of it
Iv managed to get the ai patrol and now I just need know how to make it shoot the player please explain well or give me some screen shots thanks in advaced