transform.position follow player in z axis only

Hello my enemy is going toward the player and follows his Z axis.
My problem is that i wanted to reduce the speed of enemy moving in Z axis.
Also I am only interested in Z axis.

This is the code i have now:

private void Update()
{
transform.position = new Vector3(transform.position.x, transform.position.y, target.position.z);
}

Thanks for help.

Hi,

try using transform.translate