// Update is called once per frame //remember that the OnTriggerEnter2D is actually supposed to be OnTriggerStay2D if using Space Bar thing void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.name == "Male 1") { dMan.position = instance.transform; Debug.Log(instance.transform.position); currentObject = gameObject.transform; if (/*Input.GetKeyUp(KeyCode.Space)*/ true) { //dMan.ShowBox(dialogue); if (!dMan.dialogueActive) { dMan.dialogueLines = dialogueLines; dMan.currentLine = 0; dMan.ShowDialogue(); } } } }