I’m taking an Edgenuity course on game design, and I ran into an error. I triple-checked my steps and I still get this error. Here is the code:
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using UnityEngine;
public class Mover : MonoBehaviour
{
private Rigidbody rb;
public float speed;
// Start is called before the first frame update
void Start()
{
rb = GetComponent();
rb.velocity = transform.forward * speed;
}
// Update is called once per frame
void Update()
{
}
}
Line (13,14) is the problem, yet I don’t know what’s wrong with it, because it’s written as Edgenuity wants it to be. Can someone help?