Simple c# 2D touch movement problem... HELP

Hello all, I’m a newbie in unity and scriptin’ but I do my best…
I’m developing a simple fallin’ game where my “Player” only needs to move < and >…
It has a gravity of 0,4 and every time I push guiTex my player stops instead of movin’ < or > and goes to 0 velocity again… I’m stuck with a simple movement script, plz help

using UnityEngine;
using System.Collections;
[RequireComponent(typeof (Rigidbody2D))]
[RequireComponent(typeof(BoxCollider2D))]
public class TouchControls : MonoBehaviour
{

public GUITexture guiLeft;
public GUITexture guiRight;
public float moveSpeed = 5f;

private bool moveLeft, moveRight = false;

void Update () {
if (Input.touchCount > 0)
{
Touch t = Input.GetTouch(0);

if (t.phase == TouchPhase.Began)
{
if (guiLeft.HitTest(t.position))
{
moveLeft = true;
}

if (guiRight.HitTest(t.position))
{
moveRight = true;
}
}

if (t.phase == TouchPhase.Ended)
{
moveLeft = moveRight = false;
rigidbody2D.velocity = Vector2.zero;
}
}

if (Input.GetMouseButtonDown(0))
{
if (guiLeft.HitTest(Input.mousePosition))
{
moveLeft = true;
}

if (guiRight.HitTest(Input.mousePosition))
{
moveRight = true;
}
}

if (Input.GetMouseButtonUp(0))
{
moveLeft = moveRight = false;
rigidbody2D.velocity = Vector2.zero;
}
}

void FixedUpdate()
{
if (moveLeft)
{
rigidbody2D.velocity = -Vector2.right * moveSpeed;
}

if (moveRight)
{
rigidbody2D.velocity = Vector2.right * moveSpeed;
}

}
}

First things first, please use code tags.
And if you take a script that someone else wrote, and it doesn’t work, the first thing to do is usually to throw it away and write your own, or find another that does work.

Does your character have a rigidbody and a collider as components? I believe it’ll need them for this script to work (the 2D versions of each, if applicable)

I have all of that and it still doesnt work, I have tried alot of things, but like I said, I’m newbie and just started to learn languages so I cant really see whats wrong in here…