C# Instant Teleport Script

Hi everyone, how do I make it so the script instantly teleports + 0.7 in the z axis? I tried transform.position.z += 0.7 but I get a cannot modify value error.

Transform.position.x/y/z is a read-only property. You can’t modify it directly.

This should work if I understand the question correctly. By setting the X and Y values to the current position it is simply not modifying them, in case the object is not stationary on the other axes. Which I am guessing is the case.

transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z + 0.7f);