I keep getting this error Message: (Game Object 'weapon holder')

// this is the full error is:
The referenced script on this Behaviour (Game Object ‘weapon holder’) is missing!
// and also:
The referenced script (Scoped) on this Behaviour is missing!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class scope: MonoBehaviour{

public Animator animator;
public GameObject scopeOverlay;
public GameObject weaponCamera;
public Camera mainCamera;

public float scopedFOV = 15f;
private float normalFOV;
public float ScopedSensitivity = 25f;

public bool isScoped = false;

void Update()
{
if (Input.GetButtonDown(“Fire2”))
{
isScoped = !isScoped;
animator.SetBool(“scoped”, isScoped);
if (isScoped)
StartCoroutine(OnScoped());
else
OnUnscoped();
}
}

void OnUnscoped()
{
scopeOverlay.SetActive(false);
weaponCamera.SetActive(true);

mainCamera.fieldOfView = normalFOV;
}

IEnumerator OnScoped()
{
yield return new WaitForSeconds(.15f);

scopeOverlay.SetActive(true);
weaponCamera.SetActive(false);

normalFOV = mainCamera.fieldOfView;
mainCamera.fieldOfView = scopedFOV;
}

}

Use code tags when posting code, it makes it easier to read. It also adds line numbers which help in talking about lines.

That said, this error message isn’t a script error. It means that the object in a scene or prefab has lost the reference to a script. This happens a lot when moving or renaming script files, for example, though other situations can cause it too. You need to find the object it’s referring to (clicking on the error should highlight the object), look at its Inspector, and find the component that says it’s missing. You can then remove that component and, if needed, re-add whatever it was supposed to be.