why am i getting this error ?Consider storing the value in a temporary variable

Can any one please tell me why I am getting this error In my code please ?
CS1612: Cannot modify a value type return value of `UnityEngine.Transform.position’. Consider storing the value in a temporary variable
It is showing for this line of code .

player01.position.x = mainCam.ScreenToWorldPoint (new Vector3 (75f, 0f, 0f)).x;

This is because you are setting Transform.position.x.

position is a Vector3. A Vector3 is a struct. A struct is a value type (a class is a reference type).

When you call transform.position you get a copy of the Vector3 value instead of a reference to the value (See @fafase his comment for why you get a copy), for instance: [0,0,0]. This means that this copy that you get is not linked to the transform anymore, and setting the x of a copy of a value which isn’t used anywhere is pointless, therefore the exception.

To fix this, simply follow the advise of the exception.

Vector3 newPosition = player01.position; // temporary variable

newPosition.x = mainCam.ScreenToWorldPoint (new Vector3 (75f, 0f, 0f)).x;

player01.position = newPosition;

See also:

Compiler Error CS1612 (searching with the error code is usually a good way to answer your own question)

Why mutable structs are evil

Difference between struct and class