My approach on this challenge

private void OnParticleCollision(GameObject other) {
        if(hitPoints > damage) {
            score.UpdateScore(amountToAdd);
            hitPoints -= 20;
        }
        if(hitPoints <= damage) {
            score.UpdateScore(amountToAddWhenKilled);
            GameObject vfx = Instantiate(deathVFX, transform.position, Quaternion.identity);
            vfx.transform.parent = parent;
            Destroy(gameObject);
        }
    }
1 Like

Does it work like you intended?

it does :smiley: