I am making a game of Battleship, and I came across a problem, I created a script so that the ship can fire projectiles, but it happens that whenever a projectile shooting, I create a clone of the prefab I’m shooting.
So I created a script so that after some time he was self distruted. but I’m having a little problem: he destroy the point where the projectile firing, not the “bullet”!
anyone have any idea how I can only destroy the prefab I’m shooting?
this is my scpript:
var lifetime = 1.0;
function Awake () {
Destroy(gameObject.Find(“bufabola(Clone)”).lifetime);
}