# vector3 help

**URL:** https://discussions.unity.com/t/vector3-help/497634
**Category:** Scripting
**Tags:** Scripting
**Created:** [February 15, 2013, 3:40pm UTC](https://discussions.unity.com/t/vector3-help/497634 "2013-02-15T15:40:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RankXenon](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/rankxenon/32/468699_2.png) [@RankXenon](https://discussions.unity.com/u/RankXenon)
#### Post date: [February 15, 2013, 3:40pm UTC](https://discussions.unity.com/t/vector3-help/497634/1 "2013-02-15T15:40:44Z")

</div>

when i press the GetKeyDown key i get a error saying:

> [@](#):
>
> field ‘unityengine.vector3.position’ not found

this is the script:

```auto
var weapon : GameObject;

var start1 : Vector3;
var end1 : Vector3;

var start2 : Vector3;
var end2 : Vector3;

function Update () {
	if(Input.GetKeyDown("space")){
		if(gameObject.GetComponent("emptyScript").enabled == true){
			weapon.transform.position = Vector3.Lerp(start1.position, end1.position, Time.deltaTime);
			
			gameObject.GetComponent("emptyScript").enabled = false;
		}
		else{
			weapon.transform.position = Vector3.Lerp(start2.position, end2.position, Time.deltaTime);
			
			gameObject.GetComponent("emptyScript").enabled = true;
		}
	}
}

```

---

<div class="post-metadata">

### Author: ![LeftyRighty](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@LeftyRighty](https://discussions.unity.com/u/LeftyRighty)
#### Post date: [February 15, 2013, 4:04pm UTC](https://discussions.unity.com/t/vector3-help/497634/2 "2013-02-15T16:04:50Z")

</div>

you don’t need the “.position” after start1, end1, start2 or end2

“.position” is the Vector3 variable from a transform… those vars are already Vector3s

> **[Unity - Scripting API: Transform.position](https://docs.unity3d.com/ScriptReference/Transform-position.html)**

> **[Unity - Scripting API: Vector3](https://docs.unity3d.com/ScriptReference/Vector3.html)**
