Problem to move my character 180 degree with walking animation

Hi every one!
I have 2 GUI Buttons one for the right side movement and another for the left side movement and both should play the animation : like walking animation.
what i want is: when the player is going right side and when the left button is pressed the character should flip 180 degree or opposite to the right side movement my camera is set to 2D view. And the camera should not move or flip 180 degree
Here is the code which i am using but i don’t know how to flip the animation or the character.

var Player : GameObject;
var speed = 4.0;
var iconRight : Texture;
var iconLeft :Texture;


function OnGUI ()
{
var screenw=Screen.width/7;
var screenh=Screen.height/2;
var screenw2=Screen.width/70;

if(GUI.RepeatButton(Rect(screenw,screenh+200,80,50 ),GUIContent (iconRight)))
{

Player.transform.Translate(0,0,speed*Time.deltaTim e);
Player.animation.Play("walk");

}
if(GUI.RepeatButton(Rect(screenw2,screenh+200,80,5 0),GUIContent (iconLeft)))
{
Player.transform.Translate(0,0,-speed*Time.deltaTime);
Player.animation.Play("walk");
}
}

what should i use to rotate my character 180 degree
can you all help me please

Try rotation, and not rotate… Rotation will set the actual rotation of the player, where rotate would make ur player continuously rotate as you hold the button

@ pat_sommer which rotation should i use there are many (Transform.Rotation, Rigidbody.rotation and more) which one should i use to rotate my character to 180 degree
one of them seems quite interesting that is Transform.rotation

var smooth = 2.0;
var tiltAngle = 30.0;
function Update () {
var tiltAroundZ = Input.GetAxis("Horizontal") * tiltAngle;
var tiltAroundX = Input.GetAxis("Vertical") * tiltAngle;
var target = Quaternion.Euler (tiltAroundX, 0, tiltAroundZ);
// Dampen towards the target rotation
transform.rotation = Quaternion.Slerp(transform.rotation, target,
Time.deltaTime * smooth);;
}

in this code the target is rotating between x and z axis but i want to rotate it only on x axis what should i do ?