Why when my Grounded equals false my if statement not play?

Collider2D colliders = Physics2D.OverlapCircleAll(m_GroundCheck.position, k_GroundedRadius, m_WhatIsGround);
for (int i = 0; i < colliders.Length; i++)
{
if (colliders*.gameObject != gameObject)*
{
Debug.Log(“Touching”);
animator.SetTrigger(“Grounded”);
m_Grounded = true;

if (!wasGrounded)
OnLandEvent.Invoke();
}
else
{
m_Grounded = false;
animator.ResetTrigger(“Grounded”);
}
}
Debug.Log(m_Grounded);
if (m_Grounded = false)
{
Debug.Log(“NotGrounded”);
animator.SetTrigger(“Jump”);
animator.ResetTrigger(“Grounded”);
}

Your if statement on line 20 says: if(m_grounded = false). This is an assignment, and i’m pretty sure this doesn’t even compile. Anyway, you are experiencing the problem… So the check the value of m_Grounded you use the == , instead of a single =. So like this : if(m_Grounded == false){…}. There is also a shorter way of writing this which uses the exclamation mark: if(!m_Grounded){…}

Thank you! Sorry I am extremely new to unity and c#.