I am replacing a Hunter ceiling fan with a regular hanging light. The ceiling fan had a knob for the fan and another for the lights with a dimmer switch. I took off the fan assembly and have a black wire, red wire, white wire and a copper wire. The new fixture just has 2 wires. When I hooked them up I got no power to the light. I took off the fan control knob from the wall and still no power to the fixture. Just confused at this time. Ken
The new light needs to have hot connected to switched hot and neutral connected to neutral. Neutral is always (or should always) be white or grey, so that is your white wire, and it should be white on the new fixture as well. The hot and switched hot can be any color except white, grey or green. Typically it will be black, less frequently red or blue or another color, on the fixture. In order to figure out whether the switched hot is black or red, open up the dimmer switch and see which wire it is connected to. The other switched hot (i.e., the one that was for the fan) should be capped with a wire nut. The bare copper wire is ground and should be grounded to the bare metal of the fixture when there is no actual ground wire on the fixture.
Without seeing how the wires are connected in the boxes. As suggested in another answer, start with white to white, black to black, ground to ground. If you can test for hot, then determine if you have incoming hot at the fixture or at the switch. You have black, red (both hot), white and ground, because you had 2 separate switches, 1 controlling the fan and 1 controlling the light, you should be able to remove either the red or the black from the setup. Your dimmer might be 2 black wires coming out of it, but one will go to black and the other to white in the box. If this is not the case, then we need to see the wires in both the ceiling box and the switch box. Here is a link to a site that explains this with a picture. (https://ask-the-electrician.com/ceiling-fan-wiring-diagram-1.html)