Recast hit get component: NullReferenceException: Object reference not set to an instance of an object

Ok everything is set up on both objects and assigned in the inspector no idea why Im getting this:
NullReferenceException: Object reference not set to an instance of an object

// SeconderyWeaponLockon________________________________________________________________________________________

		if (Input.GetButtonUp ("LockOn")) {  // TOGGLES LOCK ON TO BE ACTIVE OR NOT ACTIVE
			if (LockedOnActive == false) {
				LockedOnActive = true;
			} else {
				LockedOnActive = false;
				Crosshair1.SetActive (true);
				Crosshair2.SetActive (false);

		if (LockedOnActive == true) {  // if lock on is active change crosshairs and activate raycast.
			Vector3 fwd = transform.TransformDirection(Vector3.forward); //the direction the player is facing
			Crosshair1.SetActive (false);
			Crosshair2.SetActive (true);
			RaycastHit hit = new RaycastHit ();
			if (Physics.Raycast (transform.position, fwd, 60000))
			if (Hit.collider.tag == "Red_Team") {
				Hit.transform.gameObject.GetComponent<LockedOn>().IsLockedon = true;
				LockedOnTarget = Hit.collider.gameObject;

Object Hit Script:

using UnityEngine;
using System.Collections;

public class LockedOn : MonoBehaviour {

	// put this on all Enemy Ships and Targets that can be targeted

	public bool IsLockedon;
	public GameObject LockedOnSymbol;

	// Update is called once per frame
	void Update () {
		if (IsLockedon == true) {
			LockedOnSymbol.SetActive (true);


First of all. You wrote Hit 2 times. Did you mean hit?

Second. Raycast could have hit a child object so you would need to change Hit.collider.tag with hit.transform.root.tag, Hit.transform.gameObject... with hit.transform.root.gameObject... and Hit.collider.gameObject with hit.transform.root.gameObject to make sure you check everything with the root gameObject in hierarchy.

The solution.

You did not set hit to anything. How can unity know to which value put all that information? Well, you did not tell so you should fix it. Put out hit as the argument before maximum distance. Now you should be good to go!

So the line looks like if (Physics.Raycast (transform.position, fwd, out hit, 60000))