The transistor is also a 2N3904
Than, on your picture, you did not have a base resistor - the pin 10 is directly to the base. That is very bad. It may damage the chip output pin. And you did not properly connect the current limiting resistor. I recommend you look at my picture and that will tell you how to connect properly a transistor controling a led. See the two resistor. One is for the base and the other is the current limiting of the Led.
In your case, the base resistor will be the same then mine, but the value of the current limiting resistor will be different value.