Having problems with Instantiate.

So, I use handlers for everything so I need to find a way to spawn an arrow and project it forward. I have a gameObject named Arrow with the model attatched to it.

I have AttackHandler attatched to my Player and want it to fire an arrow (Which is another game object) when I hit space, could someone please show me how to use instantiate properly to clone Another game object, rather than cloning the one the script is attatched to? Thank you. The reason I’m doing it this way is I want AttackHandler to handle shooting fireballs, arrows, and other projectiles.

Please don’t link me to the script reference, I already have it up. …

EDIT: Still not getting it

var projectile:GameObject

Instantiate(projectile, Vector3(0, 0, 0), Quaternion.identity)

The thing is have your handle be attached to a spawn location, which is an empty game object. So you can just reference its location like transform.position.

so… Instantiate(projectile, transform.position, Quaternion.identity)

This is how it would be done in C#.

GameObject arrowPrefab; // be sure to assign it

void SpawnArrow()
   //Spawns arrow a ahead from player's position and uses the player's orientation for the arrow's orientation.
   GameObject newArrow = Instantiate(arrowPrefab, transform.position + transform.forward * 2, transform.rotation) as GameObject;