Create Object on Key released

var Creating : GameObject;

function Update () {
    if(Input.GetButtonUp("Jump")){
    var instance : GameObject = Instantiate(Creating,transform.position.Vector2(0,63,0),transform.rotation.Vector3(0,0,0));
    Debug.Log("Created");
    }
}

i’m trying to make an object in the game when pressing Space.
I did drop the Object that i want to create in the Component panel ontop of Creating.

It must have something to do with the Vectors.

Thanks
~Wentzel

Either change transform.rotation.Vector3(0,0,0) to Quaternion.identity

or if you want to define Euler rotations, use Quaternion.Euler(0,0,0).

A rotation is a Quaternion, not a Vector3, and I bet your code above fires errors in your console tab (which you should include in your post whenever you have a problem).

EDIT : I also noticed your transform.position.Vector2 line. I don’t think you get how vectors work in general. I assume by that line you try to spawn your “Creating” Object 63 units above the object that carries this script. In that case instead of that position line, you have to use :

transform.TransformPoint(0,63,0)

Your full code should be

var Creating : GameObject;

function Update () {
    if(Input.GetButtonUp("Jump")){
           var instance : GameObject = Instantiate( Creating, transform.TransformPoint(0,63,0), Quaternion.Euler(0,0,0));
           Debug.Log("Created");
    }
}
var Creating : GameObject;

function Update () {
    if(Input.GetButtonUp("Jump")){
    var instance : GameObject = Instantiate(Creating,transform.TransformPoint(12,1,3),Quaternion.Euler(0,0,0));
    Debug.Log("Created");
    }
}

Hmmm Still stuck.

What i don’t get it clone’s the object and then it just drops without you ever seeing it, only when you pause and press F can i see it.
The object that is Cloned has a Rigid Body and is ontop of A plane.

I really can’t see a problem.
Is there a better way to just create an Cube,scale it down and then just create it on a certain position ?

What do you mean it ‘drops’. Does it fall right through the plane? If so, make sure it has a box collider that is not a trigger and a rigidbody. Also make sure that your plane’s collider is not a trigger either. Triggers ignore collisions.

You also want to scale it down? You didn’t mention that before. Unfortunately you must first create it on a certain position and THEN rescale it. You can always reposition it afterwards if the scaling makes it pass through the plane.

I’m afraid I can’t help you more if you don’t tell me what exactly you’re trying to do (as in, what object carries the above script, what is it you’re trying to create, what is it supposed to do, etc). Like this, that’s the best advice I can offer.