GUI text timing and clicking

Hello,

I was wondering if anyone has any idea how can be done in js the following:
I have some multiple line text. What I am trying to do is to display these lines one after another, for example after every 5 seconds a new line should appear. But also if you click the next line will appear automatically and as the time goes on it will appear the next line. I hope it’s understandable what I am trying to ask. :slight_smile:

E.g.
line 1: text 1
line 2: text 2
line 3: text 3
If you don’t do anything, after every 5 seconds the lines appear. If you click after line 1, line 2 appears immediately and after another 5 seconds line 3 will appear.

I managed to display the text when clicking and also the timing but separately. If I put it together it won’t work.
Does anyone has any idea how can this be done?

Thank you in advance.

If you can make it work each way, you should be able to make both work together by using the mouse click to set the timer again for the next line. If that’s not clear, post the code.