Making object appear on hover but disappear when not hovering

I am new to C Sharp, Unity3D, and Unity Answers. I am a somewhat decent learner so I hope you guys can help me understand how to do this.

I am trying to make an object appear on hovering over a block with this script attached to it, and disappear when the mouse is not hovering over it. I thought I could make it simple by disabling the GameObject ingame while detecting the mouse using OnMouseEnter and OnMouseExit. It appears either the script is too simple, or I am doing it wrong.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SelChangeState : MonoBehaviour {

    public GameObject Sel;
    public GameObject Sel2;

	void Start () {
        Sel.SetActive(false);
        Sel2.SetActive(false);
    }
	
	void OnMouseEnter () {
        Sel.SetActive(true);
        Sel2.SetActive(false);
    }

    void OnMouseExit ()
    {
        Sel.SetActive(false);
        Sel2.SetActive(true);
    }
}

This script also changes another object known as Sel2.

I cannot figure out how to get this working. Is this even possible? Am I doing it wrong? This isn’t the right way to go, is it?

I fixed it! I overlooked one small thing called IsTrigger in the Box Collider settings. I had to had that ENABLED for it to work.

And yes, a 3rd object existed with the script in it, and it didn’t disappear. The Script is in working condition.