How to make a basic fps ai that shoots.

Pretty much im new to unity and scripting and i wanna make a basic ai that walks around and when he sees me he shoots at me

look at free tutorials man come on
people aren’t gonna spoon feed
you a half a game. BTW, here you
go. This is a script that automatically
sees the player and advances. This
player won’t randomly walk around
though. Mess around with the
script or add a new one.

make your own script bud

//this is a follow script not a rotation script ;D

{

public int speed;
public GameObject player;

void Update()
{
    Vector3 localPosition = player.transform.position - transform.position;
    localPosition = localPosition.normalized;
    transform.Translate(localPosition.x * Time.deltaTime * speed, localPosition.y * Time.deltaTime * speed, localPosition.z * Time.deltaTime * speed);
}