Scaling a GameObject c#

I´m trying to rescale an object at runtime but I can´t find a working method. :frowning:

transform.localScale.x= health/100;

This gives the error:
Assets/Assets/Scripts/enemy.cs(15,27): error CS1612: Cannot modify a value type return value of `UnityEngine.Transform.localScale’. Consider storing the value in a temporary variable

You have to do it this way in c#.

transform.localScale = new Vector3(health/100,transform.localScale.y,transform.localScale.z);