How to turn on/off a script within a script in javascript

Ok so i’ve been messing with examples from other people on how to turn a script off/on with javascript. Ive ran into a bunch of problems. I want to have an if statement look like this

 if(Input.GetKeyUp(KeyCode.Q))
        {
        animation.Play("3dview");
        player.GetComponent(playerMovement3d).enabled = true;
        }
        else{
        player.GetComponent(playerMovement3d).enabled = false;
        }

So what i want in the end result is to have the animation play which is played by pressing (q) (which works) and when it plays turn on the 3d playerMovement script and turn off the 2d playerMovement script. Once that works i also want the camera animation to play only one time until you press (e) which turns back to 2d. Please help me!!!

Also the camera transition between 2d and 3d works with the push of a button, and thats how i want the movement script to work as well. So when you change to 3d view you can move in 3d and when you change to 2d view you can move in 2d.

EDIT: The movement scripts work but i cant disable and enable them within the script that makes the views change. PLEASE HELP!!!