Can't add script componet "MenuScript.cs" because the script class cannot be found.

I am having trouble making a start menu right now for my game. All the code seems the be fine, here are the first few lines.

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

public class MenuScript : MonoBehaviour 
{

When I try to add it to my StartMenu in my hierarchy is says “Can’t add script componet “MenuScript.cs” because the script class cannot be found.” I don’t know what this means or how to fix it.

I get the same prob just restart unity and copy this into a new c# script

Check you have the spelling and capitalisation for ‘MenuScript’ exactly the same in both the editor and on your script?

Make sure the file name is also MenuScript.cs and make sure there are no duplicates.