Having trouble enabling an gui node

I’m having trouble enabling an gui node, I have a simple text node that says “GAME OVER” and I have disabled it in the Properties of my gui and I want to turn it on if game_over is true, here’s what my code look like:

if game_over then
	gui.set_enabled("game_over", true)
end

The node is in a gui called gui attached to a game object called interface, I also tried:

gui.set_enabled("interface#game_over", true)

Thanks for any help,

Brian

That small snippet of code looks fine. Is it throwing an error or just not showing up?

not showing up, and I know that section of code is running as I put a debug print in there

To be bale to use node, you need to get it:

gui.set_enabled(gui.get_node(""game_over"), true)

see API reference (gui)

1 Like

Thanks, that was it! :grinning:

1 Like