Array Index is out of Range?

Ok so using the code below I’m getting this error on line 11 “otherThing.animation[anims[a]].speed = animSpeed[a];”, but I can’t figure out why, I’ve tried it a lot and made sure that its all set right, each of the variable arrays have a size of 2. Is there something with my script or just a bug with unity?

EDIT: Oh also I put in a debug.Log and start seems to be calling twice???

var otherThing : GameObject;
var anims : String[];
var transforms : Transform[];
var layers : int[];
var animSpeed : int[];

function Start(){
for(var a : int = 0; a < anims.length; a++){
otherThing.animation[anims[a]].AddMixingTransform(transforms[a]);
otherThing.animation[anims[a]].layer = layers[a];
otherThing.animation[anims[a]].speed = animSpeed[a];
}
}

maybe you have the script attached to 2 objects, this is why start is executing twice?
Debug.Log the following and you will see it:
anims[a]
animation[anims[a]]
animSpeed[a]
anims.lenght
animation.lenght
animSpeed.length

Whoops, forgot about my spawning script which spawns then deactivates enemies into an enemy pool. The prefab that was spawning didn’t have one of the variables set to anything. All fixed now.

. So see if you can figure out how big your anims.length truly is and that might be the root cause of your bug.