Toggle a script on or off - (See attached image)

I would like to be able to toggle on/off the orbit camera script with a button press from the user.
Does anyone know a way to do that?

orbit_camera_on_off

I need to be able to turn on/off the orbital camera when the user is doing lerp and slerp animations of the camera as the user clicks around different parts of the application because the orbit script interferes with lerp and slerp.

This is the orbit camera script I have modified slightly for my own purposes:

Does anyone have an answer to this question?

Press Space to toggle the script.

Project: PlayCanvas | HTML5 Game Engine
Code: PlayCanvas | HTML5 Game Engine
API:

Each scriptType has an enabled attribute similar to an entity. To toggle the scriptType on/ff, you set the attribute true/false.

Perfect, thank you :smiley: