I am assuming you have two ways of ending that chat. Either we run out of stuff to talk about or we press Leave. Am I correct? How is it supposed to work?
E key pressed for the first time, first dialogue text appears, I then click Leave.
E key pressed for a second time, second dialogue text appears, I then click Leave.
That’s not what you want, right? You want to restart? Or is this fine?
E key pressed for a third time, empty dialogue appears, I then click Leave.
What does Leave really do? Perhaps the index needs resetting? If so, it’s a perfect opportunity for an event dispatcher.