How to disable blur effect C# script on my main camera from a JS script on another object?

OK so I have been tooling around for hours and maybe its late and I’m just missing something obvious, been searching the forums and questions for several hours trying different things and cant seem to sort this out.

So I have a camera named Weapon Camera. On the Weapon Camera I have a Blur Effect camera/lens effect which is a C# script.

I have a separate object that when clicked I am trying to have it disable the Blur Effect script.

On my separate objects JavaScript I have something like this:

 var FXCamera : GameObject; //set the camera that has the image effect script on it in the inspector
    
    
    function UseEffect () //the function that is called when the item in game is clicked.
    
    {
    
    	FXCamera.GetComponent("BlurEffect").active = false;// Disables the Blur effect on the weapon camera camera

What its doing is its actually disabling the weapon camera object and doing nothing to the C# script component named BlurEffect.

Any help would be appreciated. I have also tried to use enabled=false and several other ways. I know I have got to be semi close but i don’t want it disabling the weapon camera object just want it to disable the blur effect script that is attached to the weapon camera.

you could use the sendmessage function on FXCamera.

FXCamera.SendMessage("TurnOffEffects");

And have the method TurnOffEffects() set your values to Zero or whatever else you need to turn off the blur