void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "Player") { nt = collider.GetComponent <NetPlayerMotor>(); nt.endGame(); } }