How run something when the mouse hovers over button?

I can’t figure out how to make a function that runs when the mouse hovers over the button and another that runs when it stops hovering over the button.. both _mouse_entered/_mouse_exited and _on_hovered won’t work, it just doesen’t print anything.

extends Button

@onready var button = $"."

func mouse_entered():
	button.text = "> start <"
    print("HOVER")

func mouse_exited():
	button.text = "start"
    print("NOT HOVER")

image

You need to connect your functions to the mouse_entered and mouse_exited signals.

If you don’t know how to do it, I suggest checking this article: