noob question about tutorials

Hi, i’m having trouble getting the scripting tutorial to work:

http://docwiki.unity3d.com/uploads/Main/Scripting%20Tutorial.pdf

It’s fine down to 6.accessing components where I enter the script:

var switchToTarget : Transform;
function Update () {
if (Input.GetButtonDown(“Jump”))
GetComponent(Follow).target = switchToTarget;
}

and add this to the spotlight but the switchToTarget parameter doesn’t then show up in inspector view so I can’t drag my cube onto it to select it as target.

If I try to use a tag instead I get the error: Unknown identifier: ‘Follow’.

Can someone please tell me what I am doing wrong?

Hi, welcome to the forum!

Are you getting any compilation errors before you try to run the code? These could stop the script being compiled and the variable appearing in the inspector.

thanks, nope no other errors. I have since tried a number of other scripts and havn’t had any other issues but this one part of the tutorial had bewildered me.

I am having the exact same problem. I am using the iphone version of Unity. Is this a bug? What is causing this problem?

Are you sure the script’s name is Follow.js (with a capital F)?