Making an object appear ontop of the object being hovered over

I am currently rewriting scripts that I have made that don’t work well on a game I am working on. I want to make an object appear, but only appear once another object is being hovered over, and appear on that object. I also want a button to change the object that appears, and only make it appear when mouse is not hovering over the object. I am new to C#, so I am not an advanced user in it.

I have three scripts, which are terribly named and were used to house previous actions.
GoldRoom.cs

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

public class GoldRoom : MonoBehaviour {

    public GameObject MousePosition;
    public GameObject Selection;
    public AudioSource notenoughgold;
    public GameObject goldcount;
    public Text goldcounter;
    private float floatCount;
    public bool buttondown;
	
    // Use this for initialization
	void Start () {
        MousePosition.SetActive(false);
        Selection.SetActive(false);
	}
	
    public void Click ()
    {
        a
        if (Input.GetMouseButtonDown(0))
        {
            goldcounter = GetComponent<Text>();
            floatCount = int.Parse(goldcounter.text);
            buttondown = true;
            if (floatCount > 50)
            {
               notenoughgold.Play();
            }
            else if (floatCount <= 50)
            {

            }
            
        }
    }
}

Click() activates on button click.

FollowCursorSel.cs

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

public class FollowCursorSel : MonoBehaviour
{
    public float offset;
    public GameObject Selection;
    public GameObject Selection2;
    public GameObject Button;

    void OnMouseEnter()
    {
        Selection.transform.position = new Vector3(gameObject.transform.position.x + -offset, 0, gameObject.transform.position.z + offset);
    }
    void OnMouseExit()
    {
        Selection.SetActive(false);
        GoldRoom Button = GetComponent<GoldRoom>();
        if (Button.buttondown == true)
        {
            Selection2.SetActive(true);
        }
    }
}

SelChangeState.cs

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

public class SelChangeState : MonoBehaviour {

    public GameObject Sel;
    public GameObject Sel2;
    public GoldRoom Bool;


    void OnMouseExit ()
    {
        Sel.SetActive(false);
        Bool = GetComponent<GoldRoom>();
        if (Bool.buttondown == true)
        {
            Sel2.SetActive(true);
        }
    }
}

GoldRoom.cs is assigned to a button, FollowCursorSel is assigned to the objects going to be hovered over, and SelChangeState is assigned to the object going to be hovered over but only perform an action (besides one) if a button has been pressed.

The problem I am facing is that nothing works. SelChangeState.cs is the only script that does anything. FollowCursorSel.cs outputs the error:
Error Message
and GoldRoom.cs doesn’t change anything like it is supposed to.

I cannot figure out how to solve this issue, or issues. Any help would be appreciated. I may not know C# well, but if you mention a function, I can probably figure that out quickly, as I am a quick learner.

I think you are over complicating things, just simply do a raycast and instantiate an object over the hit object.

RaycastHit hit = new RaycastHit ();
		Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
		if (Physics.Raycast (ray, out hit, 1000)) {
			if (hit.transform.tag == "your tag") {
				var g = (GameObject)Instantiate (yourObject, pos, rot);
			}
		}