raycast2d not working for collision

my code

if (Physics2D.Raycast(transform.position, Vector2.down, 0.1f)){
			isGrounded = true;
			Debug.Log ("found");

it always shows that my player is on the ground even when it is in the air

This is most likely that your raycast is hitting your players collision box and returning grounded. Add a layer mask so that you are only counting your raycast against “ground” layers.