problem with reference to another script

I am trying to recreate the 2D Game Development project unity posted shown here [http://unity3d.com/learn/tutorials/modules/beginner/2d/2d-overview][1]

i keep getting this error “Object reference not set to an instance of an object
gun.Update () (at Assets/scripts/gun.cs:43)” and points to this line of code is my cs.gun script "if (playerCtrl.facingRight) "

both scripts are attached to a game object, could someone tell me where my mistake is please.

playerscript.cs - attached to my character

using UnityEngine;
using System.Collections;

public class playerscript : MonoBehaviour {



	public float maxSpeed = 10f;
	Animator anim;
	public bool facingRight = true;	
	public bool grounded = false;

	public Transform groundCheck;
	float groundRadius = 0.2f;
	public LayerMask whatIsGround;
	
	public float jumpForce = 700f;
	
	bool doubleJump = false;
	public bool jump = false;	  


	void Start () {
		anim = GetComponent<Animator> ();
	}
	
	void FixedUpdate () 
	{

	if (grounded)
		doubleJump = false;
		
		grounded = Physics2D.OverlapCircle (groundCheck.position, groundRadius, whatIsGround);
		anim.SetBool ("Ground", grounded);
		  
	
	if (Input.GetButtonDown ("Jump") && grounded) {
						jump = true;
						anim.SetTrigger ("Jump");
						rigidbody2D.AddForce (new Vector2 (0, jumpForce));
		
						jump = false;
				}
			else if (Input.GetButtonDown ("Jump") && !grounded && !doubleJump) {
				jump = true;
				anim.SetTrigger ("Jump");
				rigidbody2D.AddForce (new Vector2 (0, jumpForce));

			if (!doubleJump && !grounded)
				doubleJump = true;


				}


		if (!grounded)
			return;
		
		float move = Input.GetAxis ("Horizontal");
		anim.SetFloat ("Speed", Mathf.Abs (move));
		
		
		rigidbody2D.velocity = new Vector2 (move * maxSpeed, rigidbody2D.velocity.y);
		
		
		if (move > 0 && !facingRight)
			Flip ();
		else if (move < 0 && facingRight)
			Flip ();  
		
	}
	
	
	void Flip()
	{
		facingRight = !facingRight;
		Vector3 theScale = transform.localScale;
		theScale.x *= -1;
		transform.localScale = theScale;
	}
	
	}

gun.cs - attached to a game object that is a child of the character object

using UnityEngine;
using System.Collections;

public class gun : MonoBehaviour {



	public Rigidbody2D bullet;
	public float speed = 20f;

	private playerscript playerCtrl;
	private Animator anim;

	void awake()
	{
		anim = transform.root.gameObject.GetComponent<Animator> ();
		playerCtrl = transform.root.GetComponent<playerscript> ();


	}

	void Update ()
	
	{

			if (Input.GetButtonDown ("Fire1"))


						anim.SetTrigger ("Shoot");

		if (playerCtrl.facingRight) {
						Rigidbody2D bulletInstance = Instantiate (bullet, transform.position, Quaternion.Euler (new Vector3 (0, 0, 0))) as Rigidbody2D;
						bulletInstance.velocity = new Vector2 (speed, 0);

				} else {
						Rigidbody2D bulletInstance = Instantiate (bullet, transform.position, Quaternion.Euler (new Vector3 (0, 0, 180f))) as Rigidbody2D;
						bulletInstance.velocity = new Vector2 (-speed, 0);
				}

	}
}

Have you tried putting it in your Start() function?

void Start() {
     playerCtrl = GetComponent<playerscript>();
}