Mesh Vertices: How do I get specific ones?

I haven’t done anything with vertices before so I don’t quite know where to start.

I’m trying to get the forward 4 corners of the primitive cubes vertices.

What I’m trying to do is combine 1 cubes forward 4 vertices to another cubes rear 4 vertices. Any resources I could be pointed to or example script would be very helpful, thanks!

bamp

You know the positions of these vertices. So, do a distance check between vertex positions and weld with the closest one.