I have this code, where I have embedded the sound to play when the button is pressed which also connected to the scene transition. Therefore, the order of my transition would be Enter button pressed, and then the sound played, and then the transition.
func input(event):
if event.isactionpressed("NextLevelEat"):
$NextLevelSound.play()
if getoverlappingbodies().size() > 0:
visible = false
changetonextlevel()
This is the code I have, but when the scene is played the sound is very short instead of the length of the audio it should be.