Connecting two Path2D Nodes ingame

Godot Version

Godot 4.2


How can I make a Node “connect” to a first Pathfollow2D when it’s at the end of a first one based on proximity?

I’m working on a top-down grid/blocks-based railway system builder I’m stuck on trying to find the best way to implement the connection of the Paths. Any help or suggestion is highly appreciated