Potentiometer to change speed of DC motor

Okay, it's working now! :grin:

All I did was connecting another power source, so the problem was the 2,1mm plug and socket power source.

So why would the circuit with the 2,1mm plug and socket not work? Maybe do I connect it wrong?
I started a topic about it yesterday, and someone told me to connect to front pin to V+ and the two backpins to the GND, and that is what I did and that is the reason it not worked first.
(Wiring an 2.1mm DC Barrel Jack - General Electronics - Arduino Forum)

It would be nice if it worked with the 2,1mm socket. Maybe do you guys now how to connect a 2,1mm plug and socket in the circuit?

Big thanks!!