public override void PickUp() { Instantiate(_sound, transform.position, Quaternion.identity); GameObject player = GameObject.FindGameObjectWithTag("Player"); BaseHealth health = player.GetComponent <BaseHealth>(); if (player == null) { return; } health.restoreHealth(50); }