I followed a tutorial, and sometimes the menu works and other times it doesn't

Godot Version

4.5.1

Question

I have followed this tutorial: https://youtu.be/e9-WQg1yMCY?si=F_LJRv0xVTq_KpeI

And when I press to display the menu, sometimes it has the transparency effect and sometimes it doesn’t. The only thing I’ve added is hide() in the _ready() and in the resume() functions and show() in the pause function.

Without seeing your code, we can’t really help you.

3 Likes
extends Control

func _ready():
	$AnimationPlayer.play("RESET")
	hide()
func resume():
	get_tree().paused = false
	$AnimationPlayer.play_backwards("blur")
	hide()
func pause():
	get_tree().paused = true
	show()
	$AnimationPlayer.play("blur")
func test():
	if Input.is_action_just_pressed("Menú") and !get_tree().paused:
		pause()
	elif Input.is_action_just_pressed("Menú") and get_tree().paused:
		resume()


func _on_jugar_pressed() -> void:
	resume()



func _on_ajustes_pressed() -> void:
	hide()
	%Opciones.show()

func _on_salir_pressed() -> void:
	get_tree().quit()
	
func _process(_delta):
	test()

The code is the same that in the tutorial