Object refernce not set to an instance of an object ....

before i ask this question , I HAVE looked at answers but none of them quiet fit the same sort of problem as mine … Any way I have a little bit of my code here , im calling my RayShoot function to my other script called camshake ( for camera shake when i shoot ) but i cant figure out whats wrong. ( BTW its little bits of my code , all the braces are correct )

var other : camshake;

   other = gameObject.GetComponent("camshake");


function Start () {
   

   BulletsLeft = BulletsPerClip;

   muzzleFlash.emit = false;
   
   PHitParticle.emit = false;


}




function Update (){

  other.RayShoot ();

  if( KeyTimer > 0){
  
  KeyTimer -= Time.deltaTime;
  
  }

function Update (){

other.RayShoot ();

if( KeyTimer > 0){

KeyTimer -= Time.deltaTime;

}

Well. That error means that you are trying to access a member of a null reference. It should give you the specific line number where it happens, and you should give it to us, but I will guess…

It could be other.RayShoot() if other is null. And that could be null because
other = gameObject.GetComponent("camshake");
cannot find a component of type camshake.

Are you sure the type name is spelled exactly like that?

Using the debugger is usually the answer to all your NullReferenceExceptions. Place a breakpoint on the erroneous line and examine the value of all involved variables within the debugger.