NullReferenceException help

I just started using Unity yesterday and did the Roll-a-ball tutorial. However, I wanted to add patrolling/rolling cylinders that cause the player to disappear and make the game end if the player collides with one of the cylinders. I was able to get that part right, but the problem is I can’t get the cylinders to roll/move around. I want them to be rigidbody so that they collide with the boundary walls in the play area. I copied the code from the tutorial for the player ball, but now I’m getting a “NullReferenceException: Object reference not set to an instance of an object” error. How do I solve this?

using UnityEngine;
using System.Collections;

public class CylinderHorizontalRoll : MonoBehaviour {

	public float speedcylinderH;
	private Rigidbody rb;

	void start()
	{
		rb = GetComponent<Rigidbody> (); //want a rigid body so it can collide with the walls
	}

		// Update is called once per frame
	void FixedUpdate () 
	{	
		Vector3 movement = new Vector3 (0.0f,0.0f,2f);

		rb.AddForce (movement * speedcylinderH);
		//transform.Translate (new Vector3 (0,0,2) * Time.deltaTime); //does not collide with wall, keeps moving to the right
	}
}

I assume the problem is because you don’t have a RigidBody component attached to the object in the editor. so when the script trying to find the component on Start() its giving you a nullReference.

rb = GetComponent<Rigidbody> ();

Next time you should give the lines of the error

It your ‘rb’ which is not defined in Start. Rename your Start function with capital ‘S’.

Had you added rigidbody to the gameobjet having the script attached. if no the add rigid body component to the gameobject. May be that one will be the cause of “NullReferenceException”

You should specify what line your getting the error from but it seems to me your describing two seperate problems here. i think the nullreferencexception is because you never gave a value to speedyCyllinderH in the Start function. Also, if you want to detect collisions you should add an OnCollisionEnter(Collision otherGameObject) function to this script.