transform.Translate by ui button

hey guys,
trying make character movement by ui button, anybody have idea what iam doing wrong?

using UnityEngine;
using System.Collections;

public class Paddle : MonoBehaviour {

	public void Left(){
		Debug.Log ("left");

		transform.Translate (new Vector3 (-20f, 0f, 0f) * Time.deltaTime);
	}

}

transform.Translate should work in update ,you have to call it in every frame

so on UIbutton you have to add “event trigger” component from inspector and add two method in it pointer down and pointer up ,than on pointer down you have to select public method DownEvent and on pointer up you have to select UpEvent .

public class Paddle : MonoBehaviour {

private bool Animation=false;

public void DownEvent()

{

Animation=true;

}

public void UpEvent()

{

Animation=false;

}

 public void Update(){

if(Animation)
{

     transform.Translate (new Vector3 (-20f, 0f, 0f) * Time.deltaTime);

 }

}

}

It should be place in update

 void Update() {
        transform.Translate(Vector3.forward * Time.deltaTime);
        transform.Translate(Vector3.up * Time.deltaTime, Space.World);
    }

you can use bool to start and stop…