Null reference exception help

Please help me with this error:

Complete error from console: NullReferenceException
UnityEngine.Transform.TransformPoint (Vector3 position) (at C:/BuildAgent/work/d3d49558e4d408f4/artifacts/EditorGenerated/UnityEngineTransform.cs:293)
UnityEngine.Transform.TransformPoint (Single x, Single y, Single z) (at C:/BuildAgent/work/d3d49558e4d408f4/artifacts/EditorGenerated/UnityEngineTransform.cs:299)
FireBlaster.Update () (at Assets/Scripts/FireBlaster.cs:25)

using UnityEngine;
using System.Collections;

public class FireBlaster : MonoBehaviour {

	public GameObject Blaster;


	private Transform myTransform;
	private Transform cameraHeadTransform;
	private Vector3 launchPosition = new Vector3 ();

	// Use this for initialization
	void Start () 
	{
		myTransform = transform;
		cameraHeadTransform = myTransform.FindChild("cameraHead");
	}
	
	// Update is called once per frame
	void Update () 
	{
	if (Input.GetButton ("Fire Weapon")) 
		{
			launchPosition = cameraHeadTransform.TransformPoint(0, 0, 0.2f);
			Instantiate(Blaster, launchPosition, Quaternion.Euler(cameraHeadTransform.eulerAngles.x+90, myTransform.eulerAngles.y, 0));
		}
	}
}

thanks in advance

Seems that cameraHeadTransform is not assigned (AKA is null)

Try to debug and see if it is actually finding the camera head. As mentioned, it looks like it is not finding it correctly so it’s always best to check first.

cameraHeadTransform = myTransform.FindChild("cameraHead");
if (cameraHeadTransform  == NULL)
{
    Debug.Log("Ain't finding the head..");
}

Thanks for help.

Error was in the spelling of indicated variable