private void OnTriggerEnter(Collider other) { if(other.name == "cube1") { this.transform.SetParent(other.transform); } }