How to disable the player script when gui pop up

This is my script. I want the player don’t move when a gui window is displayed.

var obj : GameObject; // first person controller
    function OnGUI (){
           if (showIntro) {
             windowRect = GUI.Window (0, windowRect, DoMyWindow, level);
             obj.GetComponent(FPSInputController).enabled = false;

thanks to those who will answer! :slight_smile:

So all the code you want to stop will need to be inside a different if:

if (!showIntro) {

No magic. Just code it.