2D change direction of enemy

I have an enemy that moves along the ground, and I would like the enemy to change its direction. I am using a linecast to a gameobject that’s below it. My code seems to work in that the scale changes to -1 when on play, but it doesn’t actually change direction. It would be very much appericated if someone could tell me whats going on here.
This the code in Update:

transform.Translate (new Vector2 (_transform.localScale.x, 0) * moveSpeed);

// enemy turns around when gets to an edge
if (!Physics2D.Linecast (_transform.position, groundCheck.position, whatIsGround)) {
//facingRight = !facingRight;

			Vector3 scalino = _transform.localScale;
			scalino.x *= -1;
			_transform.localScale = scalino;
			print (_transform.localScale + " " + Time.time);

Do your code like this
Vector3 scalino = _transform.localScale;
scalino = new Vector3(scalino.x*-1,scalino.y,scalino.z);
_transform.localScale = scalino;
print (_transform.localScale + " " + Time.time);

Actually,
‘scalino.x = -1;’ means 'scalino.x =scalino.x -1;’
And ‘scalino.x’ is only readable so you can’t override it.