Moving Platform - Errors in console

So I’m trying to get this platform to move, the current script that is assigned to it is:

using UnityEngine;
using System.Collections;

public class MovingPlatform : MonoBehaviour {

	// Use this for initialization
	void Start() 

	// Update is called once per frame
	void Update() 
		transform.position.x = -26.5 + 6.0 * Mathf.Sin (Time.time * Mathf.PI / 2.0);

However I am getting some errors in the console:

Not exactly sure what the problem is, I’m just trying to update the x value of transform.

It is what it is. You cannot modify a component of those factory struct (Vector2/3/4, Color and others) when they are used in a factory component (Transform, Rigidbody and others). You need to do what it says, store it, use the stored one and assign it back:

Vector3 pos = transform.position;
pos.y += 10;
transform.position = pos;