Locking camera and background

So I have character BP and I want to prevent camera from moving in Z axis as well as background image, just to let character move left and right and camera follows. I tried this solution but it gave me some crazy camera movement. How can I do it?