but when I put everything on the Arduino (UNO) it doesn't work the way I expect.
What do you mean by this?
Where are those two wires going to?
What are you expecting to happen?
If those wires are just going to power and ground, try removing your button and linking acros with a wire.