Scripting Elevator not working

I am trying to make a working elevator on my map but the scripting is not working. Here is my current scripting setup:

Switch 1 (bottom)
Condition: Upon Interaction
Action: Set Power to Alpha - toggle

Switch 2 (top)
Condition: Upon Interaction
Action: Set Power to Alpha - toggle

Platform
Script 1 Condition: Upon Power State Alpha - On
Script 1 Action: Move Offset Z 40.00, Local Movement Off
Script 2 Condition: Upon Power state Alpha - Off
Script 2 Action: Move Offset Z -40.00, Local Movement Off

Am I doing something wrong here?

Also, sometimes the switches teleport when I don’t want them to.