Moving transfom.position.x over time (490855)

I want my inventory menu that is currently place off the screen to the right, to slide into the screenview moving left. Heres my code. For some reason its not sliding…it just appears. If i decrease Time.deltatime it just appears after some delay. please help.

function Update () 
{
	if( !inventoryActive )
	{
		if( Input.GetKeyDown(KeyCode.Backspace) || actionButton.HELD )
		{
			// Showing the inventory grid and its items
			inventory.guiTexture.enabled 	= true;
			inventoryActive 				= true; // Used to check extra check if inside inventory before exiting inventory
			
	//  Moving inventory grid in
			while ( inventory.transform.position.x > 0.05 ) // move in
			{
			// 0.05 is the position it should stop at after sliding into screenview
				inventory.transform.position.x -= .01 * Time.deltaTime;
				//if x is smaller than 0.05 then moved too far in, make it equal to 0.05 and stop loop
				if( inventory.transform.position.x < 0.05 )
				{
					inventory.transform.position.x = 0.05;
					break;
				}
			}
            }
     }
}

Update() is called every frame. You need to stretch your animation over multiple Update() calls. Something like:

function Update ()
{
	if( !inventoryActive )
	{
		if( Input.GetKeyDown(KeyCode.Backspace) || actionButton.HELD )
		{
			// Showing the inventory grid and its items
			inventory.guiTexture.enabled    = true;
			inventoryActive                 = true; // Used to check extra check if inside inventory before exiting inventory
		   
			//  Moving inventory grid in
			inventory.transform.position.x -= .01 * Time.deltaTime;
			if( inventory.transform.position.x < 0.05 )
			{
				inventory.transform.position.x = 0.05;
			}
		}
	 }
}