Jump function stopped working

Ever since i added projectiles, my jump isn’t working at all. Sometimes the player “drifts” a little but there is no movement along the y axis at all. I’m really not sure how to fix it…

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

	public float speed;
	public float jumpspeed;
	public float gravity;
	public float panspeed;
	private Vector3 moveDirection;
	//private Vector3 direction;
	void Start () {
		Screen.showCursor = false;
		moveDirection = transform.forward;

	}
	
	// Update is called once per frame
	void Update () {
		CharacterController controller = GetComponent < CharacterController >();
		if (controller.isGrounded) {
						moveDirection = new Vector3 (Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical"));
						if (Input.GetKeyDown ("space")) 
							moveDirection.y += jumpspeed;
						moveDirection = transform.TransformDirection (moveDirection);
						moveDirection *= speed;
								
				}
		moveDirection.y -= gravity * Time.deltaTime;
		controller.Move (moveDirection * Time.deltaTime);
		transform.Rotate (0, Input.GetAxis ("Mouse X") * panspeed, 0);


		}

}

Edit: the code for the projectile:

using UnityEngine;
using System.Collections;

public class Shooter : MonoBehaviour {

public Rigidbody projectile;
public Transform shotpos;
public float shootspeed = 10f;
public float shotforce = 1000f;
void Update () {
	if (Input.GetMouseButtonUp(0)){
		Rigidbody shooty = Instantiate (projectile, shotpos.position, shotpos.rotation) as Rigidbody;
		Physics.IgnoreCollision(shooty.collider, collider);
		shooty.AddForce(shotpos.forward * shotforce);
		
	}
}

}

shotpos is the transform of the player

I don’t think it’s the projectiles here. The problem is, that you constantly subtract the gravity from your y value of moveDirection. Put that into an else if the grounded check. Set the gravity and when jumping In your jump block I recommend you to assign and not add jumpspeed to y when pressed.

if (controller.isGrounded) {
  ...
  moveDirection.y = gravity;
  if (Input.GetKeyDown ("space")) 
   moveDirection.y = jumpspeed;
  ...
                                 
}
else {
  moveDirection.y -= gravity * Time.deltaTime;
}