Wiring problem overhead light fixture

wiring

Trying to install an overhead LED light fixture in a bedroom that previously didn’t have one. Right now the light switch controls a socket into which you can plug a lamp.

Total beginner here.

Inside the overhead light are two white wires, two black wires, and a red wire. I can get the light to turn on, but won’t switch off when I attach the white wire from the fixture to the white wires in the box and the black wire from the fixture to the red and black wires in the box.

The wall switch is set up with two black to the top screw and the red on the bottom. Any ideas? Unfortunately my pictures seem to be too big to attach.

Thanks for any advice!

Best Answer

I don't know why red and black would be tied together in the ceiling box. It should not be. The two blacks in the ceiling box should connect to each other only, and the red should be capped off.

Connect the lamp's white wire(s) as you had them, and connect the lamp's black wires to the red with an additional wire-nut. That should do it.