Position Error

I copied this straight off the documentation:

transform.position.y = Terrain.activeTerrain.SampleHeight (transform.position);

I get this:

Cannot modify a value type return value of `UnityEngine.Transform.position’. Consider storing the value in a temporary variable

What’s wrong???:frowning:

The code is Unityscript but you’re trying to use C#. In C# you have to do what the error says and make a temporary variable.

–Eric