Did you instantiate "SparksInstance" via script? If you look at the Instantiate documentation, you'll see it returns a UnityEngine.Object. But don't worry! If the object you instantiated is a GameObject, what you'll get back is also a GameObject, you just have to explicitly "cast" it as one:
//C#
GameObject sparksInstance = (GameObject)Instantiate (sparksPrefab);
// The "(GameObject)" in front of the Instantiate call treats the returned object as a GameObject.
//Javascript
var sparksInstance : GameObject = Instantiate (sparksPrefab)
// In Javascript/Unityscript, if you declare the type of the variable with its declaration, the compiler figures out what you mean to do.
ETA: Based on the code you added to your original question, you're making two steps at once. "Sparks" is a ParticleEmitter, not a GameObject. Now, it's attached to a GameObject, but you can't just treat it as one. Try this:
var SparksInstance : GameObject = (Instantiate (Sparks, Bomb.position, Bomb.rotation) as ParticleEmitter).gameObject;
If you try to copy/paste this code, note that I've used the more typical first character lowercase for variable names. Adjust accordingly.
If you try to copy/paste this code, note that I've used the more typical first character lowercase for variable names. Adjust accordingly.
– burnumdSee updated answer.
– burnumd