How to instantiate a particle and make it play?

This is the code for explosion, im getting the following error: “BCE0023: No appropriate version of ‘UnityEngine.Object.Instantiate’ for the argument list ‘(UnityEngine.GameObject, UnityEngine.Vector3, UnityEngine.Vector3)’ was found.”

I’ve been trying different things and i just cant get it to work.

function Explode(){

var self = gameObject;
destroyedpos = transform.position;
var explosionparticle = Instantiate(self, destroyedpos,;


In the third parameter of Instantiate its supposed to be a quaternion not a vector3, a quaternion is
basically rotation if you don’t know what a quaternion is, just do Instantiate(self, destroyedpos, Quaternion.identity); this will make it spawn at the same rotation as the gameObject your script is attached to