How to make reference to a script?

Hi, I want to make reference to a sript in a variable so that when the player presses a button the script plays. How would I do this?

I’ve got all the GUI functions sorted so I just need to know how to put a script as a variable.

I’m usng Javascript by the way.

You should use GetComponent() ! Try searching for it in the script reference, which is an awesome place to search for solutions before coming to the forums :slight_smile:

Good luck!