Need Help!

Does someone know how to make an enemy shooting like if it was an AI?

Because I’m doing a game and I can the enemy shoot back at me.