Why won't my power button click?

my iphone lock button randomly stopped working and i have tried replacing it, but i cant get the button to pop up (as if it is constantly stuck down. the cable works as i can push the button with a pen if i use the phone without a lock button. i just dont know why when i put a button in, it will not click