I tried to put a smaller resistor, but it acts like the the float is always on.
Then you have not got it wired up like you think you have. If it is wired up like on the schematic then this will not happen.
The long tracks on the solderless bread board has a break in the middle, and check that the ground goes back all the way to the arduino.