You might be missing a trigger. Condition is evaluated once when code execution gets to that line but after that it is evaluated only when a trigger event appears. Typically trigger is a signal on that component that is connected to the script and when signal value changes (or same value is signaled again) it gives a trigger for the script. Fix in this case could be to create a boolean signal and assign it as TransitionSignal on your container. Then on signal’s properties add connection to your script.