I have connected StreamPlayer-> TextureButton
How to make a button that stops when you release the music play
my code
`extends TextureButton
func ready():
pass
func _onTextureButtonpressed():
gettree().getroot().getnode("StreamPlayer").play()
pass
func onTextureButtonreleased():
gettree().getroot().getnode("StreamPlayer").stop()
pass
func onTextureButton_toggled( pressed ):
pass
`
but why this code does not work
Sorry for my English