The referenced script on this Behavior ( Game Object 'Camera') is missing. What shall I do?

code needed to draw with line renderer by following mouse
I have attached script(called ‘‘script’’) and line Renderer to Camera
but it doesn’t draw and show this mistake “The referenced script on this Behavior ( Game Object ‘Camera’) is missing”
Here is the code:

    using UnityEngine;
    using System.Collections;
    public class Draw :
    MonoBehaviour {
RaycastHit hit;
string dtxt;
bool  mouseIsDown = false;
LineRenderer lineRender;
int numberOfPoints = 0;
void  Start (){
}

void  Update (){
	Ray ray = new Ray(transform.position, transform.forward);
	ArrayList thePath = new ArrayList();
	dtxt = "";
	ray = GetComponent<Camera>().ScreenPointToRay (Input.mousePosition);

	if (Physics.Raycast (ray, out hit, 1000)){
		if (mouseIsDown) {
			thePath.Add(hit.point);
			lineRender.SetVertexCount( thePath.Count );
			lineRender.SetPosition(thePath.Count - 1, hit.point+new Vector3(0,1,0));
		}
	}

	if(Input.GetMouseButtonDown(0))
	{
		mouseIsDown = true; 
	}
	if (Input.GetMouseButtonUp(0)){
		mouseIsDown = false;
	}

	//transform.parent.gameObject.transform.eulerAngles.y += 0.2f;

}

}

Not 100 percent sure if this works so I’m sorry if it doesn’t but could try adding " Public Camera cam" to where you initiated your variables and "ray = cam.ScreenPointToRay(Input.mousePosition) "
Hopefully, it works, sorry if I wasted you time :frowning: