Trigger Camera Effect

Hi, I have a first person player in my game. On the player’s camera there is a motion blur script which is disabled. I want when my player Enters a trigger effect enables.

I was looking on google and trying to figure it out but everything was wrong.
Plss help me out with code (C#)!

this code doesn’t woork:

using UnityEngine;
using System.Collections;

public class EnableComponents : MonoBehaviour
{
    private Script blur;
    
    
    void Start ()
    {
        blur= GetComponent<MotionBlur>();
    }
    
    
    void Update ()
    {
        if(Input.GetKeyUp(KeyCode.Space))
        {
            blur.enabled = !blur.enabled;
        }
    }
}

Add this on line 3:

using UnityStandardAssets.ImageEffects;

so the script would look like this:

using UnityEngine;
using System.Collections;
using UnityStandardAssets.ImageEffects;

[RequireComponent(typeof(MotionBlur))]
public class EnableComponents : MonoBehaviour
{
    private MotionBlur motionBlur = null;
    public MotionBlur MotionBlur
    {
        get
        {
            if (motionBlur == null)
            {
                motionBlur = GetComponent<MotionBlur>();
            }
            return motionBlur;
        }
    }

    void Update()
    {
        if (Input.GetKeyUp(KeyCode.Space))
        {
            MotionBlur.enabled = !MotionBlur.enabled;
        }
    }
}

And for the trigger, use: “Unity - Scripting API: Collider.OnTriggerEnter(Collider)” and “Unity - Scripting API: MonoBehaviour.OnTriggerExit(Collider)