Dynamically created gui node text appears on the screen only for a moment

Good time of day,
When gui_script receive a message, the text appears on the screen for less than a second and disappears.

button.gui_script:

function on_message(self, message_id, message, sender)
	if message_id == hash("_create") then
		n_text = gui.new_text_node(vmath.vector3(100, 160, 0),"lol")
	end
end

Are you using layers in your gui? If so, are you also setting the layer of the created node to the correct one? Is the text node created behind some other node? I’m not sure what happens when you don’t set a font. Perhaps it picks the system font or the first font in your gui.

1 Like

While I was trying to give the most detailed answer, I found what the problem was)
Thanks for the help!

Happy to hear that you found the problem! What was it?