I am in process to make a 3D fps game with unity. But when i wrote the code to destroy the bullet after a particular time say - 5 seconds, till 5 seconds it spawnes the bullet and after 5 seconds the bullets spawned bullets get destroyed. But after that when i try to again spawn bullets, they dont get spawned and it shows the error GameObject has been destroyed but you are still trying to access it.
here is the destroy bullets code

```
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using UnityEngine;

public class Bullet : MonoBehaviour
{
    public float speed = 8f;
    public Camera playerCamera;
    public float lifeDuration = 2f;
    private float lifeTimer;

    void Start()
    {
        lifeTimer =  lifeDuration;
    }

    // Update is called once per frame
    void Update()
    {
        transform.position += playerCamera.transform.forward * speed * Time.deltaTime;

        lifeTimer -= Time.deltaTime;
        if (lifeTimer <= 0f)
        {
            Destroy (gameObject);
        }
    }
}

```