new unity user please help!

So today I found this script: Unity - Scripting API: CharacterController.Move that I copied down and I’m pretty sure I copied it correctly but I can’t get it to work.

#pragma strict

var speed : float = 6.0;
var jumpSpeed : float = 8.0;
var gravity : float = 20.0;

private var moveDirection : Vector3 = Vector3.zero;

function update(){
var controller : CharacterController = GetComponent(CharacterController
);
if (controller.isGrounded){
moveDirection = Vector3(Input.GetAxis(“Horizontal”), 0,
Input.GetAxis(“Vertical”));
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *=speed;

if (Input.GetButton (“Jump”)){
moveDirection.y = jumpSpeed;
}
}
moveDirection.y -=gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);
}

function Start () {

}

function Update () {

}

I created a character controller and I attached it to the “player” then I attached the script onto that. When I try to play it however it doesn’t do to let me move around, however when I look at the script I don’t think there are any errors.

Hi,

The “function update” is written incorrectly, it’s a capital U on update, so it should read like this: function Update().

Here’s the updated script:

var speed : float = 6.0;
var jumpSpeed : float = 8.0;
var gravity : float = 20.0;

private var moveDirection : Vector3 = Vector3.zero;

function Update()
{
var controller : CharacterController = GetComponent(CharacterController);

if (controller.isGrounded)
{
moveDirection = Vector3(Input.GetAxis(“Horizontal”), 0,
Input.GetAxis(“Vertical”));
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *=speed;

if (Input.GetButton (“Jump”))
{
moveDirection.y = jumpSpeed;
}
}

moveDirection.y -=gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);
}

Thanks,
Chris

Chris you are my hero. I’m super new to this but I’m so passionate about gaming and getting my ideas out there. I really really appreciate your help!