I know this is most likely REALLY simple but ive only been doing unity for 2 days

I’ve only been using unity for two days and I have this script:

using UnityEngine;
using System.Collections;
using System;

public class NewBehaviourScript : MonoBehaviour {
    public float spin;
    public  Rigidbody rb;
    private float magnitude;

    void Start () {
        rb = GetComponent<Rigidbody>();


	void FixedUpdate() {
        float h = Input.GetAxis("Horizontal") * magnitude * Time.deltaTime;

       Rigidbody.AddTorque(transform.forward * h);


(I didn’t make most of this! It’s from a tutorial and I edited it!)
it wont work and I keep getting this:
object reference is required for the non-static field, method, or property ‘Rigidbody.AddTorque(Vector3)’
what do I do? thx!

(I fixed your formatting for you - please use the 101010 button when pasting code snippets in the future - otherwise, among other things, your lines numbers will all be wrong which makes it hard for you to follow help you are given)

Rigidbody is a class. The particular rigidbody component instance attached to the script on which this object is placed is called rb - that’s what you’re doing on line 11.

And it’s that rigidbody you want to add torque to, not to all Rigidbodies in general. So you need to change line 18 to:

rb.AddTorque(transform.forward * h);