Hello I want my button to play sound when is pressed. I putted a audiostreamplayer as a child and a sound into it. The game is starting but i dont hear any kind of the sound that i put into the button. my script is:
{
extends Control
onready var sound = $AudioStreamPlayer
func _on_StartGameButton_pressed():
get_tree().change_scene("World.tscn")
sound.play()
}
is there anything i forget about that