Run Jump ("w" + "left shift") + ("space") not working

I have everything else running correctly, but getting this separate jump (while running) animation to work is confusing me. The player walks, runs, walks backward, runs backward, jumps in place and turns while moving. I need him to be able to "Run Jump when im holding the “w + left shift” combo. So I guess im getting my self all mixed up trying to get all buttons together in the same spot in the right order…right now, nothing happens when running and pressing the space bar. Script below, thanks for any insight :pray:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class animationStateController : MonoBehaviour
{  
	Animator animator;
	int isWalkingHash; 
	int isRunningHash;
	int isWalkingBackwardsHash;
	int isRunningBackwardsHash;
	int isJumpingHash;
	int isRunJumpingHash;
	
	void Start()
	{
		animator = GetComponent<Animator>();
		isWalkingHash = Animator.StringToHash("isWalking");
		isRunningHash = Animator.StringToHash("isRunning");
		isWalkingBackwardsHash = Animator.StringToHash("isWalkingBackwards");
		isRunningBackwardsHash = Animator.StringToHash("isRunningBackwards");
		isJumpingHash = Animator.StringToHash("isJumping");
		isRunJumpingHash = Animator.StringToHash("isRunJumping");
	}
	  
	void Update()
	{
		bool isrunning = animator.GetBool(isRunningHash);
		bool iswalking = animator.GetBool(isWalkingHash);
		bool iswalkingbackwards = animator.GetBool(isWalkingBackwardsHash);
		bool isrunningbackwards = animator.GetBool(isRunningBackwardsHash);
		bool isjumping = animator.GetBool(isJumpingHash);
		bool isrunjumping = animator.GetBool(isRunJumpingHash);
		bool forwardPressed = Input.GetKey("w");
		bool runPressed = Input.GetKey("left shift");
		bool backwardPressed = Input.GetKey("s");
		bool runbackPressed = Input.GetKey("left shift");
		bool jumpPressed = Input.GetKeyDown("space");
		bool runjumpPressed = Input.GetKeyDown("space");
			
		if (!iswalking && forwardPressed)
		{
			animator.SetBool(isWalkingHash, true);
		}
			
		if (iswalking && !forwardPressed)
		{
			animator.SetBool(isWalkingHash, false);
		}
		
		if (!isrunning && (forwardPressed && runPressed))
		{
			animator.SetBool(isRunningHash, true);
		}
		
		if (isrunning && (!forwardPressed || !runPressed))
		{
			animator.SetBool(isRunningHash, false);
		}
		
		if (!iswalkingbackwards && backwardPressed)
		{
			animator.SetBool(isWalkingBackwardsHash, true);
		}
			
		if (iswalkingbackwards && !backwardPressed)
		{
			animator.SetBool(isWalkingBackwardsHash, false);
		}
		
		if (!isrunningbackwards && (backwardPressed && runbackPressed))
		{
			animator.SetBool(isRunningBackwardsHash, true);
		}
		
		if (isrunningbackwards && (!backwardPressed || !runbackPressed))
		{
			animator.SetBool(isRunningBackwardsHash, false);
		}
		
		if (!isjumping && jumpPressed)
		{
			animator.SetBool(isJumpingHash, true);
		}
			
		if (isjumping && !jumpPressed)
		{
			animator.SetBool(isJumpingHash, false);
		}
		
		if (!isrunjumping && (runjumpPressed && forwardPressed && runPressed))
		{
			animator.SetBool(isRunJumpingHash, true);
		}
		
		if (isrunjumping && (!runjumpPressed || !forwardPressed || !runPressed))
		{
			animator.SetBool(isRunJumpingHash, false);
		}
	}
}

Let’s modify the condition for isrunjumping to ensure it triggers when both “w” and “left shift” are pressed for running, and then “space” is pressed for jumping. Also, we’ll adjust the conditions for jumpPressed and runjumpPressed accordingly.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class animationStateController : MonoBehaviour
{  
    Animator animator;
    int isWalkingHash; 
    int isRunningHash;
    int isWalkingBackwardsHash;
    int isRunningBackwardsHash;
    int isJumpingHash;
    int isRunJumpingHash;
    
    void Start()
    {
        animator = GetComponent<Animator>();
        isWalkingHash = Animator.StringToHash("isWalking");
        isRunningHash = Animator.StringToHash("isRunning");
        isWalkingBackwardsHash = Animator.StringToHash("isWalkingBackwards");
        isRunningBackwardsHash = Animator.StringToHash("isRunningBackwards");
        isJumpingHash = Animator.StringToHash("isJumping");
        isRunJumpingHash = Animator.StringToHash("isRunJumping");
    }
      
    void Update()
    {
        bool forwardPressed = Input.GetKey("w");
        bool runPressed = Input.GetKey("left shift");
        bool jumpPressed = Input.GetKeyDown("space");
            
        // Check for running jump
        if (forwardPressed && runPressed && jumpPressed)
        {
            animator.SetBool(isRunJumpingHash, true);
        }
        else
        {
            animator.SetBool(isRunJumpingHash, false);
        }
    }
}