Why isn't my player moving?

using UnityEngine;
using System.Collections;

public class Monkey : MonoBehaviour {
	    
	    public float speed = 5f;
		public float movement = 0f;
	    private Rigidbody2D rigidBody; 

	    // Use this for initialization
	 void Start () {
		rigidBody = GetComponent<Rigidbody2D> ();
	}
	            
	// Update is called once per frame
	void Update() {
		movement = Input.GetAxis ("Horizontal");
		if (movement > 0f) {
			rigidBody.velocity = new Vector2 (movement * speed, rigidBody.velocity.y);
		}
		else if (movement < 0f) {
			rigidBody.velocity = new Vector2 (movement * speed, rigidBody.velocity.y);
		} 
		else {
			rigidBody.velocity = new Vector2 (0,rigidBody.velocity.y);
		}
	}
}

change public float speed = 5f; to public float speed ; then go to unity editor and change the value of speed inside the unity via inspector , or you should use private float speed=5f;

also you can use this it’s a little smaller.

public Rigidbody2D rigidBody;
public float mooooove;
public float moveSpeed;
void Start () {
	rigidBody = GetComponent<Rigidbody2D> ();
}

void Update () {
	mooooove = Input.GetAxisRaw ("Horizontal");
	if (mooooove != 0) {
		rigidBody.velocity = new Vector2 (mooooove*moveSpeed,rigidBody.velocity.y);
		transform.localScale = new Vector3 (mooooove,1,1);
	}
	if (mooooove == 0) {
		rigidBody.velocity = new Vector2 (0,rigidBody.velocity.y);

	}