Trouble converting transform.position to C#

I am trying to get transform.position (so the objects current position/rotation) to work in C#. I have created a temporary variable to store the information in but it doesn’t really seem to work…anybody know how to help me? Thank you in advance!

void Update () 
	{
	Vector3 MyTransform = transform.position;
	MyTransform.position = PlayerCamera.transform.position + (Quaternion.Euler(0, targetYrotation,0) * Vector3(holdingSide, holdingHeight, 0));
	}

Your variable MyTransfrom already points to transform.position, so writing MyTransform.position is like writing transform.position.position.

Do you mean to have this?

Transform myTransform = transform;
myTransform.position = PlayerCamera.transform.position + (Quaternion.Euler(0, targetYrotation,0) * new Vector3(holdingSide, holdingHeight, 0));

Note that you need the keyword new before the Vector3 constructor as you are creating a new Vector3 object. Appologies if I have made a mistake, I don’t have monodevelop on this PC.