NullReferenceException: Object reference not set to an instance of an object CursorHit.LateUpdate () (at Assets/Resources/NewScripts/HeadLookScripts/Sharp/CursorHit.cs:12)

Hello,
I keep on getting this error:
NullReferenceException: Object reference not set to an instance of an object
CursorHit.LateUpdate () (at Assets/Resources/NewScripts/HeadLookScripts/Sharp/CursorHit.cs:12)
on this script:

using UnityEngine;
using System.Collections;

public class CursorHit : MonoBehaviour {

public HeadLookController headLookVehicle;
public HeadLookController headLookHelicopter;

// Update is called once per frame
void LateUpdate () {
	
	headLookVehicle.target = transform.position;
	headLookHelicopter.target = transform.position;
}

}

I was wondering if you guys knew how to fix this because this error is spamming my error box about 10 a second :frowning:
Thanks

It looks like you don’t actually have any “HeadLookController” object assigned to those variables in the inspector.