I made a particle system to make it look like my player is running and it’s working fine but when I jump the particles don’t disappear, here’s what i’ve tried
public void Update()
{
if(Input.GetButtonDown("Jump") && isOnGround == true)
{
if(isTouchingBench || isTouchingFireHydrant || isTouchingBarrel) return;
jump = true;
jumpSound.Play();
animator.SetBool("isJumping", true);
DirtParticle.Stop();
}
}
public void OnLanding()
{
animator.SetBool("isJumping", false);
DirtParticle.Play();
}