camera fixed follow in 3rd person character blueprint?

a camera follows a player x-axis only.
it should not move y or z-axis
the character can move y and z but the camera stays at the locked position and follow the player in x-axis only

The best way to do that would be to Detach the Camera/Camera Spring Arm on begin play, and in your Tick tell the camera to follow the player (Either with SetLocation, VInterpTo, or whichever method you require) and add a constraint in the Z and Y axis (Or whichever you need), detaching the camera from the player gives you much more control over the camera in general, and you can still reference it in blueprints easily.