How to assign a script in C# ?

I need to assign a public script to a variable in my script. How would I do this?

Can you please give more details? What you said was sort of vague. I may be wrong, but are you asking to get a value (via a variable) from another script? Or call on a function from another script and return that value to the current script?

I’m asking how could I assign a script to a variable in C#. I need it so that the script won’t activate until about 5 seconds after I run the scene.

If you want it to activate 5 seconds, use a start menu function.

void Start(){
invoke("scriptStart",5);
}
void scriptStart(){
this.enabled = true;
}

disable the script in the editor
That assumes the start function works on a disabled script. If it doesn’t then you’d have to do something else.

If the above doesn’t work (which is unlikely), there are a few things I can think of (like having another object - like the Main Camera - instantiate the object, which in turn would also have the script or maybe a component can be enabled from another script) but all of this actually seems over the top. But I can’t judge that at all without even knowing what you are trying to accomplish.

Why do you need to wait 5 seconds to start an entire script? Maybe I can help suggest a better alternative.