Can not attach to Directional Light

I created a empty object and set it as trigger, then added this script:

using System.Collections;
using UnityEngine;
public class Light : MonoBehaviour
{
public Light light;

void OnTriggerEnter()
{
    light.enabled = false;
}

void OnTriggerExit()
{
    light.enabled = true;
}

}

But when try to drag and attach my directional light to it, it’s not happening. Why?

A friend of me tried in his own pc but it’s worked for him. It’s not a problem about objects or script. Then what’s the problem? Help please…