Problem with infinite loop.

Hello guys, today im working with my traffic light but i have problem. My while loop is doing only one sequence in loop. Pls help and tell what’s wrong there and why in the end red(object) light won’t change at black/green(object) at green?