Headlight motor

DE DORSETT

PONTIAC

96 Pont. Trans Am 129,000 miles. My head lights pop up when I turn on my parking lights(they just pop up not light). When I turn them off my head light motor makes a loud rumbling noise for maybe 10
seconds then stops. Is the problem in the headlight
switch or the motor. I heard the motor is really expensive so I don't want to change it if it won't solve the problem of the pop ups.