Space Shooter Bolts v5

So I’m following the tutorial on shooter and I’m on 1.6, where I make some code for the bolt. Here is my code: enter code here

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Controller : MonoBehaviour
{
public float speed;

void Start()
{
    rb = GetComponent<Rigidbody>();
    rb.velocity = transform.forward * speed;
}

}

However, I get an error saying that they can’t find “rb”. However, this code has worked in my player controller. Was wondering if I could borrow anyone elses v5 code.

You forgot to declare rb.

private Rigidbody2D rb;