if (transform.position.x == -38.12f) not working :\

I’ve created an if statement and it’s not working. Code:
public class poruszanie : MonoBehaviour {

	public static int Lewo;
	public static int Prawo;
	public static int Poz;
	public Rigidbody2D gracz;
	public Transform graczPos;

	void Start () {
		Poz = 1;
	}
	void Update ()
	{
		if (Prawo == 1 && Poz >= 1 && Poz < 4)
		{
			gracz.velocity = new Vector2 (100, 0);
			Debug.Log ("Yea");
			Prawo = 0;
		}
		if (graczPos.position.x == -38.12f) 
		{
			gracz.velocity = new Vector2 (0, 0);
			Poz++;
			Debug.Log("aeY");
		}
	}
}

try using Mathf.Approximately, floats can be inacurrate when calculated and may not just be “-38.12f” and might be “-38.12000001f” instead which would not be true in your case.

change line 18 and to the following and see if it works better for you.

if (Mathf.Approximately(graczPos.position.x, -38.12f))

This will only work if position x is exactly -38.12, not sure this is what you want to to.

Maybe try

if (graczPos.position.x <= -38.12f)

Sometimes, when objects rotate they change their position, try jikkou code or make a collider with trigger that in update will check the graczPos is in the trigger.