The while wait do loop never ends once the function fires. Also, wait(0.0001) isn’t a good way of doing this. You should use task.wait() since () equals about 0.03 seconds minimum anyway. This means wait(0.0001) can only ever wait(0.03).
Are you trying to always set the CFrame of the camera to the Part, or do you want it to change from Scriptable back to normal when something happens?
Try a repeat until loop and check to see if the player leaves the elevator (I’m just guessing about this) and if they do then reset the camera back to normal.