UnityEngine.Component doesn't have a definition for AddForce.

So for some reason this website doesn’t like console errors, so here’s the screenshot of what I was going to post on it’s own.

First please include your script

I think (but not sure since you didn’t include script) that you didn’t declare what rigidbody is.

You should do this:

using UnityEngine;
using System.Collections;

public class test1 : MonoBehaviour {

    public Rigidbody yourrigidbody;
	// Use this for initialization
	void Start ()
    {
	    
	}
	
	// Update is called once per frame
	void Update ()
    {
        //now do what you want
        yourrigidbody.AddForce(transform.forward * 10);
	}
}