Change UI button state to "pressed" via script

Good evening,

I have some UI buttons, but as my game is for Android, I’m having some problems with changing the state of the button, I have one sprite for the button and one for it when pressed. The problem is, I can’t change the state of the button. Bellow is the script I’m using the check if the button was touched, and I’m sending a message to it. How do I change the state of this button so it can show the right sprite (Pressed)?

void Update () {
		if (Input.touchCount > 0 && Input.GetTouch (0).phase == TouchPhase.Began) {
			RaycastHit2D buttonHit;
			buttonHit = Physics2D.Raycast(this.transform.position, Input.touches[0].position);
			if (buttonHit)
				objectHit = buttonHit.transform.gameObject;
				if ( == "Button_Play")

are you using Unity UI buttons? if not, why not? if yes, check this out, no code needed. Just create a UI button change transition and assign sprite, done

Sprite Swap Option on Button

Using Event System instead.