Instantiation with inheriting velocity problem

while (count < numberofBouncyBalls) 
{   
     var eplosive1 : Rigidbody = Instantiate(bouncyExplosive, transform.position, transform.rotation);

     eplosive1.rigidbody.velocity = rigidbody.velocity;
     eplosive1.angularVelocity = rigidbody.angularVelocity;

     count = count + 1;
 }

Alright I am attempting to use this for something I am making where a single rigidbody bouncy ball splits into 3 or as many as I want other bouncy balls, and it is easy to simply instantiate an amount of them however they simply start bouncing up and down boaringly, I am trying to use this to give each ball the velocity and such of the ball they are technically separating from but for some reason I get this error.

InvalidCastException: Cannot cast from source type to destination type. Separate+Start$20+$.MoveNext () (at Assets\WeaponScripts\Separate.js:20)

I am not to experienced with javascript so I was wondering if anyone could point me towards the reason why this is happening or a fix to my problem, cheers.

recommand

more better fucntion

rigidbody.AddForce(velocity, ForceMode.VelocityChange);

rigidbody.AddTorque(angularVelocity, ForceMode.VelocityChange);

Probably your bouncyExplosive prefab does not have a Rigidbody component attached to it, so when you cast it to Rigidbody and assign to variable eplosive1, it spits out that error.