Translate Object In Diagonal Direction 2D

Hello Everyone…

I am developing 2d game…

In my scene i have plane direction is x(horizontal) - y(vertical).

I am generating object and randomly moving them left and right in x direction…

Script for instantiating Object :

function CreateRandomShip()
{
		z = -6.72f;
		y = Random.Range(-1.00f , 6.00f);
		
		randomNumber = Random.Range(0,2);
		if(randomNumber == 1)
		{
			x = -5.00f;
			enemy2Prefab.gameObject.name = "Enemy2Type1";
			
		}
		else if(randomNumber == 0)
		{
			x = 5.00f;
			enemy2Prefab.gameObject.name = "Enemy2Type2";
		}
		
		
		enemy2Prefab.transform.position = new Vector3(x , y , z);	
		Instantiate(enemy2Prefab,enemy2Prefab.transform.position,enemy2Prefab.transform.rotation);
	}

Script for translating game object :

function Update () {
	currentSpeed = Random.Range(minSpeed , maxSpeed);
	
	var amttomove : float = currentSpeed * Time.deltaTime;
	if(gameObject.name.Equals("Enemy2Type1(Clone)"))
	{
		transform.Translate(Vector3.right * amttomove , Space.World);
	}
	else if(gameObject.name.Equals("Enemy2Type2(Clone)"))
	{
		transform.Translate(Vector3.left * amttomove , Space.World);
	}
}

But i want my object to move diagonally also with left right direction…

So what should i write to move my object??

Please help me to perform this action…

Thanks in advance for your help and support…

var whatWayToGoInLife:Vector3;

whatWayToGoInLife = Vector3.left * amttomove;

whatWayToGoInLife = whatWayToGoInLife + Vector3.up * amttomove;

transform.Translate( whatWayToGoInLife , Space.World);

ok?