Stop movement if transform.position.y == 0

Why not work the following code?

    public GameObject cube;     private GameObject inst;     public float speed=5;       void Start () {         inst = Instantiate(cube, new Vector3(0, 10.6f, 0),Quaternion.identity);     }       void Update () {          inst.transform.Translate(speed * Vector3.down * Time.deltaTime, Space.World);          if (inst.transform.position.y == 0)         {             speed = 0; //stop moving         }     }