Instantiate problem Need help thank you

Im making an asteroids game and am trying to Instantiate four prefabs in space surrounding an asteroid everytime i shoot it though evertime i try to do this i destroy the asteroid and Instantiate four asteroids surrounding my space ship.

this is my code for Instantiating my objects :frowning:

if(hit.rigidbody.gameObject.name == "AsteroidA"){
for (var i : int = 0;i < 4; i++)
Instantiate (gameObject.Find("AsteroidA"),Random.insideUnitSphere *8 +transform.position,Random.rotation);
}

So you want asteroids to be instantiated around asteroid you hit instead of ship? If so, here’s the code:

if(hit.rigidbody.gameObject.name == "AsteroidA"){
for (var i : int = 0;i < 4; i++)
Instantiate (gameObject.Find("AsteroidA"),Random.insideUnitSphere *8 +hit.transform.position,Random.rotation);
}