How do I create a static colliders like a floor to a to a user drawn line?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By xtreme

I found this GitHub - starryalley/godot-draw-eraser-demo: A demo godot project which implements draw, eraser, and undo tool which works exactly as I want, it is possible to delete without deleting the background.

How can I add a static colliders to the drawn line? I guess I have to do it with a script sense the line is drawn in the game from the user. I Found this https://forum.godotengine.org/39266/adding-staticbody2d-to-the-object-with-a-script but can’t get them to work together.

My goal is that the user can draw a line like a floor and then move the player on the drawn floor.