Replacing light - with red, white and black
First off thank you for any advice you may have... Issue: I had a fixure that fell out of my ceiling so I'm not sure how it was all connected. What I see in the ceiling are 5 black wires a connect via a thick twist connector, I have the same 5 connected the same way for white wires, then I have one single Red wire. I connected my white to white and black to black from the light fixture since that what it had (only white and black). Well good news the light worked but would not shut off at the switch. I then tried putting the red with the group of black, heard a pop but light stayed on even when shutting off through the switch. Idiot me, I tried the red with the white and pop I blew the switch outlet. So then I decided to power test the wires... Black and white light the tool, but black/red, or white/red does not. I know all the wires must go to other fixtures in the dinning room as when I removed the black cap twist from the 5 black wires, a couple light went out... so now I bought a new fixture with black, white and green (ground). Should I attach all the black, all the white and my red from the ceiling to the new ground wire from the fixture? Will that make the switch work?