How to create enemy AI

how can I create enemy AI for my fps? like have them roam around and if they see me then they attack.

What you are looking for is behavior trees and nav mesh. Here’s a video series that should help get you started: