Can't add Lerpz character scripts to my own scene

Hello gang,

I’m trying to apply the Lerpz character scripts to my own character in my own scene and am getting this error when I try to apply any of the 3 scripts below:

I’m using these 3 scripts:

ThirdPersonPlayerAnimation.js

ThirdPersonController.js

SpringFollowCamera.js

I tried them on my character in the tutorial scene and they worked. One thing, in the tutorial it says Unity providess the character controller script which gets added to Lerpz, but I can’t find the script in the tutorial files or in the standard assets.

Am I missing some key script or did I neglect to do something in my scene?

I am new to Unity and I don’t know any scripting.

Thanks in advance for any help.

—Josh :cry:

91965--3612--$errormsg_193.png

Hi,

The Character Controller script is part of the Character Controller component. You can add one to your character by choosing the Component → Physics → Character Controller menu item.

The scripts you’re trying to add require this component, though I can’t recall at the moment if they try to force Unity to add one to whatever object you’ve dropped them onto. (I know I wrote the tutorial, but my memory’s lousy!)

The error message you’re seeing is actually quite clear: all Unity scripts are compiled before they’re run. Usually this happens quickly enough for you not to notice – you might spot a message mentioning that Unity’s compiling a script in the status bar at the bottom of the Unity window – but sometimes, on slow machines or machines which could probably use more memory, it can take long enough for you to have to wait a bit.

(Note that Unity only compiles scripts once. Once compiled, a script won’t be compiled again, unless you change it.)

@stimarco,

Thanks, for the reply. I figured that out over the weekend. It also seems that that error comes up when the script is not working. It turns out that a bracket was in the wrong place :sweat_smile:

I fixed it and the script is working :smile:

Best,

—Josh