Hello, Im trying to disable 2 diffirentscripts when entering my keypad(its a OnTriggerEnter) and enabling them when clicking on the GUI button Ok after typing in the code to open the door. The scripts I want to disable is the SmoothMouseLook script which I got on my FPScontroller and the other script I want to disable is on my camera which is a MouseLook script (my Camera is a child of my FPS controller). How would I write if I want to access both of them and disable them OnTriggerEnter? I tried putting GetComponent().enabled = false; but Im getting an error, Object reference not set to an instance of an object.
Anyone can help me out here?