Button on a generated line

Godot Versio

4.2

Question

How can I make the line2d I created clickable

You probably don’t need to add a button, but should be able to use something like this instead: _unhandled_input()