Trouble with gettng values to appear in inspector

Hi all,

I am very new to unity and scripting in javascript, and am confused…

I am watching a tutorial on how to make a character shoot, and have completed the script. But when I add it to the character, and look at the script in the inspector, the values i want to appear there are not appearing…it is just the script referenec? I hope this makes sense. Here is the code, i want to be able to see the variable ‘pellet’ in the inspector when I add it to a character…

#pragma strict

var pellet : Transform;

function Start () {

}

function Update () {

	if (Input.GetKeyUp("o"))
	{
		public var pelletfire = instantiate (pellet, gameObject.find("Bullet_spawnpoint").transform.position, Quaternion.identity) 
	}
		

}

You probably have an error in your code. Try changing your IF statement to:

if (Input.GetKeyUp(KeyCode.O))
{
var pelletfire = Instantiate (pellet, GameObject.find("Bullet_spawnpoint").transform.position, Quaternion.identity)
}

It would appear you have some capitalization issues as well as a couple other possible problems.