Script accesing another script, cannot attach in editor

I have a script on a prefab that will delete a database and its index from a json file. I need to access the loaddatabase script I wrote on another scene.

When I set up the variable LD, which links to the script, I get a null reference, but when I try to add the script in the editor, it will not let me.

public LoadDatabase LD;

...

LD.GetAllDatabases ();

When I click on the LD to attach the script to it, it gives me a none under assets.
How can I access this via script?
Thanks!

You need to drop a gameObject which has the script into the field. It can’t just reference the text file that contains the source code.