Problem with Auto instantiating in X seconds in C#

Hi! I'm new to Unity and C# and wanted a little help with this little Script of mine.

I'm not quite sure if the title is explicit.

So, what I want to achieve is, basically:

I have an enemy with a Gun attached to it. This gun has an empty GameObject that should be "shooting" prefabs forward and there should be some time (set by myself) between every shot. Ten seconds after the bullet has been shot, it is destroyed.

I have achieved this in my FirstPersonController with right mouse click. But I can't seem to make it automatically.

My question is, if I instantiate the enemies when going through a trigger, how can I make them start shooting automatically after being instantiated, given an X time between shots?

NOTE: The enemies should just shoot forward, not aiming or anything. And they'd have to do it endlessly.

This is what I have so far.

using UnityEngine;
using System.Collections;

public class EnemyShootScript : MonoBehaviour {
public Rigidbody EnemyBullet;
public int speed = 50;
public int ShootTime = 5;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update (){

    if(Input.GetButtonDown("Fire2")){ //This is where there should be the automatic firing code
    Rigidbody EnemyAmmo  = Instantiate (EnemyBullet, transform.position, transform.rotation) as Rigidbody;

    EnemyAmmo.velocity = transform.TransformDirection(new Vector3(0,0,speed));

    Destroy(EnemyAmmo.gameObject, 10); //I destroy the bullet after 10 seconds
    }
}
}

I've also tried using WaitForSeconds, but I just can't seem to entirely get it, though.

If someone could help me with this, I'd be really thankful.

This is very simple. WaitForSeconds is the way to go.

ShootScript.cs

using UnityEngine;
using System.Collections;

public class ShootScript : MonoBehaviour {
    public float timeBetweenShots = 5.0f;
    public Rigidbody bullet;
    public float bulletSpeed = 500;
    public float bulletLifetime = 10.0f;
    public bool shooting = true;

    void Start() {
        StartShooting();
    }

    void StartShooting() {
        shooting = true;
        StartCoroutine("TimedShooting");
    }

    IEnumerator TimedShooting() {
        while(shooting) {
            if(bullet) {
                Rigidbody newBullet = Instantiate(bullet, transform.position, 
                                          transform.rotation) as Rigidbody;
                newBullet.AddForce(transform.forward * bulletSpeed);
                Physics.IgnoreCollision(collider, newBullet.collider);
                Destroy(newBullet.gameObject, bulletLifetime);
                yield return new WaitForSeconds(timeBetweenShots);
            }
        }
    }
}

To create your own timed destruction, you could also use WaitForSeconds:

AutoDestruct.cs

using UnityEngine;
using System.Collections;

public class AutoDestruct : MonoBehaviour {
    public float lifetime = 10.0f;
    void Start() {
        StartCoroutine("TimedDestruct")
    }

    IEnumerator TimedDestruct() {
        yield return new WaitForSeconds(lifetime);
        Destroy(gameObject);
    }
}

or not

AutoDestruct.cs

using UnityEngine;

public class AutoDestruct : MonoBehaviour {
    public float lifetime = 10.0f;
    void Start() {
        Destroy(gameObject, lifetime);
    }
}