Finding game object, not working

Trying to use variables of another script by using this:
but it is not finding it. Am I supposed to include the .js?

var manager: WeaponManager=GameObject.Find(“WeaponManagerScript”);

Your code is trying to find a gameObject named “WeaponManagerScript”. From your question it sounds like you’re trying to find a component. so you’ll need to use FindObjectOfType instead, and pass in the type (the script name, minus the .js).

Try to add tag to the objects and use

GameObject.FindObjectWithTag(“the object which you want”);