BCE0018: The name 'FirstPersonController' does not denote a valid type ('not found')

Hi, I was trying to GetComponent some C# variables from JavaScript and I keep getting this error

Assets/Standard Assets/_MyAssets/Scripts/WeaponScripts/Ver2/M16V2Weapon.js(48,17): BCE0018: The name 'FirstPersonController' does not denote a valid type ('not found'). 

and I googled it for solution and it said put the FirstPersonController script into Standard Asset folder and I did it but I still get the same error.

Here’s the part of my script

#pragma strict

var fpsScript : FirstPersonController;
    
function Awake()
{
fpsScript = GameObject.Find("player").GetComponent(FirstPersonController);
}

Does anyone know how I can fix this? Thank you for reading.

I’m afraid you have to use C# OR JavaScript. You can’t mix and match them unless they are completely stand alone components, and even then I’m not sure it’s a good idea to mix them.

In your case, I assume FirstPersonController is written in C#, and your Javascript methods have no idea what to do with that (including the fact it doesn’t know what FirstPersonController is).