How can I ensure my first event finishes before moving on?

heres a basic little flickering lights script thats simple, but not optimal.