How can I create enemy AI that patrol and shoot the player

Thanks the tutorial really helped but how can I engage a combat system for my stormtrooper to shoot the player? I got the patrol AI set up and everything but need it to shoot the player.