[Solved] 2D Character facing left

I’ve had to go through a few posts to find out how to make a 2D platformer character turn left and I eventually adapted a script I composed from several posts. The result is below. It looks similar to the standard 2D move script, except instead of having a single ‘Horizontal’ move I have assigned independent move keys to ‘HorizontalR’ (right) and ‘HorizontalL’ (left). These two have no negative key responses, the positive keys for ‘HorizontalL’ are the original negative keys for ‘Horizontal’.

The key is to use the ‘eulerAngles’ to rotate left but you need to make sure to have a rest, i.e. a value of zero, to make sure the character returns to normal orientation when you head right.

var speed : float = 4.0;
var jumpSpeed : float = 8.0;
var gravity : float = 20.0;

private var moveDirection : Vector3 = Vector3.zero;

function Update () 
{
	var controller : CharacterController = GetComponent(CharacterController);
	if (controller.isGrounded)
	{
		moveDirection = Vector3(Input.GetAxis("HorizontalR"), 0, 0);
		moveDirection = transform.TransformDirection(moveDirection);
		moveDirection *= speed;
		
		// jumping
		if (Input.GetButton ("Jump"))
		{
			moveDirection.y = jumpSpeed;
		}
		// turning left when move left, borrowed and adapted from [url]http://forum.unity3d.com/threads/26036-Face-the-direction-that-i-m-moving-in-(2D-movement),User:tet2brick[/url]
		if (Input.GetButton ("HorizontalL"))
		{
			moveDirection = Vector3(Input.GetAxis("HorizontalL"), 0, 0);
			moveDirection = transform.TransformDirection(moveDirection);
			moveDirection *= speed;
			transform.eulerAngles.y = 180;
			
			if (Input.GetButton ("Jump"))
			{
				moveDirection.y = jumpSpeed;
			}
		}
		// return character to normal direction when heading right
		else if (Input.GetButton ("HorizontalR"))
		{
			transform.eulerAngles.y = 0;
		}		
	}
		
	// applying gravity    
   	moveDirection.y -= gravity * Time.deltaTime;
	// moving the character
	controller.Move(moveDirection * Time.deltaTime);
}

(This is my first time posting, I apologise if it is constructed poorly, feel free to repost a better version)

Thanks for posting some working code.
Many times people will ask for help and either not respond when help is given or just say they have got it working without sharing how they solved the problem.