// Update is called once per frame void Update() { if (playerScript.isShot()) { if (timePassed > 1f) { Destroy(gameObject); } } }