How to make text appear and then disappear in a scene?

You could simply create the widget and add it to the viewport on the trigger event. Is there any reason you need the widget reference before this?