I made this script and have no idea why it isn’t working… Could someone please help me?alt text
I keep getting errors like: The type or namespace name ‘rigidBody’ could not be found, and The type or namespace name ‘RigidBody’ could not be found… I added a Rigidbody to the game object.
Can it be that the problem is that I’m trying to attach it to a particle system?
,
I made this c# script, but it isn’t working… I keep getting different errors and I remade it like a 1000 times…
I used this kind of script for movement scripts, and I do not know why it isn’t working. Can someone please tellme what I did wrong?
For clarity in reading, rename RigidBody to something else, like rb. You have Rigidbody ( the component) represented by RigidBody. In the Start function you are saying RigidBody - GetComponent RigidBody. it should be with a small “B”. make the two more distict so to avoid confusion like this
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class vliegen : MonoBehaviour {
Rigidbody rb;
void Start(){
rb = GetComponent<Rigidbody>();//you had <RigidBody> with capital "B"
}