Why wont my player move (C#)

Hi i have a player movement script the jump works fine. but the player will not move at all.

CODE

using UnityEngine;
using System.Collections;

public class HalfScreen1 : MonoBehaviour {
	public float playerSpeed;
	public float jump;
	
	
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {


		foreach (Touch touch in Input.touches) {
			
			// your if statements for movement and jump
			
			if (touch.position.x < Screen.width/2)
			{
				if(grounded)
				{
					GetComponent<Rigidbody2D> ().velocity = new Vector2 (GetComponent<Rigidbody2D> ().velocity.x, jump);
				}
			}
			else if (touch.position.x > Screen.width/2)
			{
				transform.Translate(Vector3.right *Input.GetAxis("Horizontal") * playerSpeed * Time.deltaTime);
			}
		}
	}

In the first if condition, what is “grounded”? Are you sure it’s true at some time during execution? Are you sure “playerSpeed” and “jump” are set to something different than 0 in the inspector?

Inside the second if statement, your obviously using touch input, but then you’re using “Input.GetAxis(“Horizontal”)”. As far as I know it will return 0 unless you’re pressing the arrow keys or a joystick, so you’re probably translating your object 0 units to the right (i.e. it won’t move).