how to move an object on tag

This will be in a ground box and i want to move it up when player get into. for example an elevator.

what im doing wrong help plzz?

public class blockUP : MonoBehaviour {

public GameObject thiss;

public float speedX = 0;
public float speedY = 10;
// Use this for initialization
void Start () {}
void Update ()
	{
	
	}

	void OnTriggerEnter2D(Collider2D other)

`` {

	if (gameObject.tag == "player") 
	{
		transform.Translate (new Vector2 (speedX, speedY) * Time.deltaTime);
	}
	
}

}

Two problems. First if (gameObject.tag == "player") is going to be checking the tag of the object with this script on it, ie: the lift. You should use if (other.tag == "player").

Secondly OnTriggerEnter is only going to run any commands within it once so if you do correct it to other all you will see is the lift move once when the player enters and then stop.

You could put your movement within a coroutine that is called on trigger enter or just have the trigger set a boolean to true which is checked in update.

    public float speedX = 0;
    public float speedY = 10;
    private bool playerEntered = false;    

     void OnTriggerEnter2D(Collider2D other)
     {
         if (other.tag == "player") 
         {
            playerEntered = true;
         }         
     }

    void Update () {
        if (playerEntered == true)
        {
            Vector2 liftMovement = new Vector2(speedX, speedY);
            transform.Translate(liftMovement * Time.deltaTime);
        }
    } 

Unless your lift is actually going to change speed mid motion you may want to assign liftMovement globally though rather than constantly creating a new Vector2 on update as that is pretty inefficient.

To stop the lift just set playerEntered as false when the lift reaches the destination. You may want to look into using a Coroutine instead though. Bit more complex but it will give you better control over the movement in the end.