Thanks very much for the answer. Now I can finally pause the game, and it was very simple.
I only needed to read the Documentation Page and not your code example
(probably because the code example is already on the Documentation Page).
I managed to shorten the example code from the Documenation. Now it's only a simple if-statement:
extends Control
func _process(_delta):
if Input.is_action_just_pressed("pause"):
get_tree().paused = !get_tree().paused
if get_tree().paused == true : $Popup.show()
if get_tree().paused == false: $Popup.hide()
This is my pause scene:
Control: "Pause" ? ?
⤷ Popup: "Popup"
⤷ RichTextLabel: "Text" ?
————————————————————
If you don't disagree, I'll write you in my game credits: