hey guys i need some help with trying to destroy these clones after a certain period of time. i need them to be destroyed so that there isn’t a clutter of them. here is my script. the script is attached to what is being cloned.
thanks for your guys help
public class destroyenemy : MonoBehaviour {
private float timerfive;
void Start () {
}
// Update is called once per frame
void Update () {
timerfive += Time.deltaTime;
if (timerfive > 3)
{
Destroy(gameObject);
}
}
}