To anybody stuck on this - took me a while to figure out.
If you’re getting the error “The referenced script on this Behaviour (Game Object ‘Text’) is missing!”, triple check that your script file name and the class name in your script match!
In my case, my script was called TextController.cs, while in the code I had
public class TextChanger : MonoBehaviour {
This will happen if you rename the script file after creating it - the code inside it will remain the previous one!
Changed my code to
public class TextController : MonoBehaviour {
(same as the file name) and it worked.