bullet destroyed cant fire anymore

i am making an FPS game the character shoots the bullet and after 5 secs it is destroyed and thats good but i cant fire anymore…i tried to destroy on collision but the character wont fire…i think it is colliding with the character controller…but thats not the proplem the proplem is that when it is being destroyed after 5 sec i cant shoot anymore…

var bulletLife = 5;

function Awake () {

Destroy(gameObject, bulletLife);
}

If you want help, we are going to need to see more than this. Where is the script that fires the bullet?

1 Answer

1

make a prefab and instantiate the prefab every time you press fire button

see documentation of instantiate

instantiate gameobject