void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.tag == "Boss") { Rigidbody2D Dave; Dave = col.GetComponent <Rigidbody2D>(); if (Dave != null) { Debug.Log("force"); Dave.AddForce(HitForce); } col.GetComponent <JumpyDragon>().Damage(Damage); Destroy(this.transform.root.gameObject); } }