Hi everyone i know this question is asked alot but im kicking myself with this. In unity it says error CS0120, an object reference is required to access non-static member?

This is my script. Hope you can help.

using UnityEngine;
using System.Collections;

public class RandomRotator : MonoBehaviour
private Rigidbody rb; line 6

public float tumble; line 8

void Start() line 10
    rb = GetComponent<Rigidbody>(); line 12
    rb.angularVelocity =        line 13

    Rigidbody.angularVelocity = Random.insideUnitSphere * tumble; line 17



What the error is saying is Rigidbody is a non-static member and you are trying to reference it in like this

Rigidbody.angularVelocity = Random.insideUnitSphere * tumble;

when you should be doing this

rb.angularVelocity = Random.insideUnitSphere * tumble;

Thank you so much, you have been a big help. Now its saying error CS1031 type expected. I know I have been grilling you about this but I am new to unity and I don’t know much. @Mavina

public GameObject explosion;
public GameObject playerExplosion;
private object Gamecontroller;
private object gamecontroller;

void OnTriggerEnter(Collider other)
    if (other.tag == "Boundary")
    Instantiate(explosion, transform.position, transform.rotation);
    if (other.tag == "Player")
    if ((playerExplosion != null) && (gamecontroller != null))
        Instantiate(playerExplosion, other.transform.position, other.transform.rotation);
         Gamecontroller.GameOver ();
         gamecontroller = GameObject.GetComponent<>(Gamecontroller);