extends Label
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Variable to track visibility state
var is_visible: bool = true
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if Input.is_action_just_pressed("escapedesalir"):
is_visible = !is_visible # Toggle visibility
visible = is_visible # Apply the new visibility state
--------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------
Explicacion: Tengo en el blog otros GDScript con el mismo tema, pero este es el perfecto, el otro giraba el texto label 180 grados en la pantalla y se salia del juego y no se podia ver, luego al presionar otra vez -Esc- volvia a girar y se podia ver de nuevo.