Area2d exit signal not working

Godot Version

4.7.stable

Question

hello, I wanted to use the _on_Area2D_area_exited but even though the area entered version of this worked, the exited one didn’t.

here’s the code

func _on_interact_area_entered(area: Area2D) -> void:
	print("entered")
	current_interactions.push_back(area)
func _on_interact_area_exited(area: Area2D) -> void:
	print("exited")
	current_interactions.erase(area)

whenever the two areas collided, I would get the entered output, but when they moved apart, i wouldn’t get the exited output
Thank you for reading

Where did you connect the signal to your _on_interact_area_exited function?

Might that have been deleted somewhere along the way?

If you create a connection in editor and use Ctrl-Z frequently to undo, this happens all too soon.

Which is why people often use script to declare a signal connection.

yeah it wasn’t connected to anything (that green thing in the left right?) i double clicked the area_exited on the signal selector and it connected just fine and now it works

Thanks!