My Rigidbody2D.Addforce don't work :(

Hello i’m new to Unity and i’m currently trying to understand physics-based movement:

SO i was trying to move my cube to the right by this script

using UnityEngine;
using System.Collections;

public class Addforce : MonoBehaviour {
	int speed = 10;
	// Use this for initialization
	void Start () {
	// Update is called once per frame
	void Update () {


	void FixedUpdate () {
		if (Input.GetKeyDown (KeyCode.RightArrow))
			Rigidbody2D.AddForce (new Vector2(speed, 0));

But MonoDevelop tell me there is an error on the begining of the line of the RigidBody. SOmething about the object needing a reference (sorry the error is in french and i don’t know how to translate it properly). I don’t understand where my mistake is oO

Thanks a lot :wink:

Rigidbody2D.AddForce (new Vector2(speed, 0));

Here you use cap R which stands for the class while you want to access the instance. Long story short:

 rigidbody2D.AddForce (new Vector2(speed, 0));

should be:

rigidbody2D.AddForce (new Vector2(speed, 0));

Also I think you got a type-o:

put line 18 between {} brackets.