Set vertex position to the same position than other vertex by index

I am creating a geometry node setup and i need to join some vertex. I have the vertex in their positions and the way that I am trying to do is creating a mesh line with the same number of vertex than my other vertex from which I want to copy the position.

(At the top, the independent vertices, at the bottom, the mesh line with the same number of vertices)

After this, I have been trying to copy the position by index; Set vertex 0 position from the mesh line to the vertex 0 position from my individual vertex, vertex 1 to vertex 1, etc, I have been trying capturing attribute, also with sample index and sample nearest nodes, but I can´t find the way to make it work, it have sense to me copy the location according to index. Anyone know how could I do that? If there is another way instead of creating a mesh line also works to me too.
Thanks! =)

Something like this?
Sample positions by index…

Hope that helps

1 Like

Wow, that was exactly was I was trying to do but I didn´t achieve, thanks a lot!!

1 Like

Glad to help.

1 Like