title: Audio won't play until after I let go of key
body: <p>I'm trying to create an FPS game and I got everything covered for the most part.</p>
  <ul>
  <li>Walking</li>
  <li>Sprinting</li>
  <li>Crouching</li>
  <li>Jumping</li>
  <li>Gravity</li>
  </ul>
  <p>However, I'm trying to implement a system where, whenever you hold down the LeftShift button, it will also play this sprinting Audio.</p>
  <p>The problem is, whenever I'm holding the Shift button, I'm running, but the audio won't play until AFTER I let go of the shift button.</p>
  <p>I haven't found any other forums with a similar issue as mine. I was wondering if anyone could help me identify the issue? Thank you and apologies in advanced if the answer is obvious, I'm quite new.</p>
  <pre><code>using UnityEngine;
  </code></pre>
  <p>using System.Collections;</p>
  <p>public class Movement : MonoBehaviour</p>
  <p>{</p>
  <pre><code>public CharacterController controller;
  
  public float speed = 12f;
  
  public float jumpHeight = 3f;
  
  //Gravity
  
  public float gravity = -9.81f;
  
  Vector3 velocity;
  
  //Sprinting
  
  public bool isSprinting;
  
  public float sprintingMultiplier;
  
  //Crouching
  
  public bool isCrouching;
  
  public float crouchingMultiplier;
  
  public float crouchingHeight = 2f;
  
  public float standingHeight = 4f;
  
  //Ground check
  
  bool isGrounded;
  
  public Transform groundCheck;
  
  public float groundDistance = 0.4f;
  
  public LayerMask groundMask;
  
  void Update()
  
  {
  
      //Ground check
  
      isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);
  
      if (isGrounded &amp;&amp; velocity.y &lt; 0)
  
      {
  
          velocity.y = -2f;
  
      }
  
      //Walking
  
      float x = Input.GetAxis(&quot;Horizontal&quot;);
  
      float y = Input.GetAxis(&quot;Vertical&quot;);
  
      Vector3 move = transform.right * x + transform.forward * y;
  
      //Jumping
  
      if (Input.GetButtonDown(&quot;Jump&quot;) &amp;&amp; isGrounded)
  
      {
  
          velocity.y = Mathf.Sqrt(jumpHeight * -2f * gravity);
  
      }
  
      //Sprinting
  
      if (Input.GetKey(KeyCode.LeftShift))
  
      {
  
          isSprinting = true;
  
      }
  
      else
  
      {
  
          isSprinting = false;
  
      }
  
      if (isSprinting == true)
  
      {
  
          move *= sprintingMultiplier;
  
          FindObjectOfType&lt;AudioManager&gt;().Play(&quot;Run&quot;);
  
      }
  
      //Crouching
  
      if (Input.GetKey(KeyCode.C))
  
      {
  
          isCrouching = true;
  
      }
  
      else
  
      {
  
          isCrouching = false;
  
      }
  
      if (isCrouching == true)
  
      {
  
          controller.height = crouchingHeight;
  
          move *= crouchingMultiplier;
  
      }
  
      else
  
      {
  
          controller.height = standingHeight;
  
      }
  
      //Gravity
  
      velocity.y += gravity * Time.deltaTime;
  
      controller.Move(move * speed * Time.deltaTime);
  
      controller.Move(velocity * Time.deltaTime);
  
  
  }
  </code></pre>
  <p>}</p>