How can I hide text a text node

I try to hide a text node and i whrited

gui.set_text(errornode, " ")

errornode is the name of the node i want to hide.
but i got the answer

ERROR:SCRIPT: /main/ui.gui_script:23: bad argument #1 to 'set_text' (userdata expected, got nil)
stack traceback:
	[C]: in function 'set_text'
	/main/ui.gui_script:23: in function </main/ui.gui_script:22>

what should i do?

It seems errornode is nil?
How did you get the node?

Regardless, it’s more convenient to disable the component using the disable event

i’ve getted help from my dad.
it was a local saved node

2 Likes

For gui nodes, you can disable (and enable) individual nodes with:

local node = gui.get_node("errornode")
gui.set_enabled(node, false)
4 Likes