private void OnTriggerStay2D(Collider2D other) { PalameterScript palam = other.GetComponent <PalameterScript>(); StatusScript status = other.GetComponent <StatusScript>(); if (status != null && status.IsInvincible) { return; } palam?.GainDamage(damage); status?.EnInvincible(); }