cannot get move/collision with player

60106-capture.png

My player object should be able to stand on the cloud and when i press right/left arrow key, it should have move horizontally . Code was written to work that way but it does not work as it supposed to. Instead it falls freely without colliding with the cloud. heres my code

using UnityEngine;
using System.Collections;

public class Player : MonoBehaviour {

public float speed = 8.0f;
public float maxVelocity =3.0f;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

	float force = 0.0f;
	float velocity = Mathf.Abs(GetComponent<Rigidbody2D>().velocity.x) ;

	float h = Input.GetAxis ("Horizontal"); //getting input along x-axis only

	if (h > 0) {
		if (velocity < maxVelocity) {
			force = speed;
			Vector3 scale= transform.localScale;
			scale.x = 1;
			transform.localScale = scale;
		}
	} else if (h < 0) {
		if (velocity < maxVelocity) {
			force = -speed;
			Vector3 scale= transform.localScale;
			scale.x = -1;
			transform.localScale = scale;
		}
	}
	GetComponent<Rigidbody2D>().AddForce(new Vector2(force,0));

}
}

Can anyone please help me to sort it out ?

Add collider to cloud if not added already. you can add either box collider or mesh collider.