this is how my game tree looks like: the Canvas Layer and pause element have the process set to "When paused"
here is the code:

	if event.is_action_pressed("pause"):
		get_tree().paused = true
                $CanvasLayer.show()```
 there are no mistakes

    try setting canvaslayer to visible equal to true

    giwi swap you last line to $CanvasLayer.visible = true

    • giwi replied to this.

      retroshark it helped me, however, when I go to pause again, the menu is not displayed, as I understand it, because I hide it in the pause code hide() how could I put $CanvasLayer.visible = false from the pause code?
      pause code:

      
      func _ready():
      	show()
      
      func _process(_delta):
      	pass
      
      func _on_resume_pressed():
      	hide()
      	get_tree().paused = false```

        giwi You can swap hide() with $CanvasLayer.visible = false

        • giwi replied to this.

          retroshark I do not know how to do this $Canvas Layer.visible = true in one file and hide() in another how could I get this node from an arc file

            giwi What node is the function _on_resume_pressed() attached to?

            • giwi replied to this.

              giwi
              Does the script run always?
              If not it doesn't show because the script is paused, too.
              So try moving the $CanvasLayer.show() line up or setting the process_mode to PROCESS_MODE_ALWAYS.