I want the LED to be at 1023. When the potmeter is at 255, I want the LED to have gone back down to 0.
a dead line fast approaching
I think you have analogRead and analogWrite ranges the wrong way around.Have a look at the reference.
I made it work with two if conditions