Tag change script not executing


I'm learning ignition and practicing with scripting in Perspective. I am trying to execute a script when a boolean tag changes values. I can accomplish what I want to do on an onActionPerformed script with a toggle switch that is bound to the tag, however I want the script to execute when the tag itself changes (like simulating a value from a PLC or manually changing the value itself in the tag browser). I have tried a value changed script and a gateway tag change script and cannot get either to execute. I don't get any errors or see any of the print statements in the console.

In the example below, I want to manually change the value of machineStatus in the tag browser and have it trigger a script when changed. As of now, changing the value in the tag browser switches the corresponding toggle switch component, but no script executes. When I toggle the component itself, the script executes (because of the onActionPerformed script).

I have also tried a value changed script and cannot get it to execute either. How can I add a script to the tag that has the same functionality as the onActionPerformed script?

You should be able to accomplish this by adding a custom property to your view and then bind that to the 'machineStatus' tag. Add a 'change script' to this custom property which executes your code.
Tag changes -> Tag binding registers change -> Custom property changes -> Change script executes.

This worked. Thanks for your help!