How to make a building system similar to plane crazy or BABFT

So, ive been trying to make a game that has similar building physics to plane crazy or build a boat for a few years.

what im trying to make is a system where when you click on a building plot, a anchored block is placed in a grid system. and when the play button is clicked, all the parts that have faces touching eachother, get welded, and all the blocks get welded to eachother and unanchored.

what i have tried so far:
ive tried many :makewelds and so on but most are outdated and dont work.

i would appreciate any simple grid build system and a for i, v script that for example goes thru the folder of all the placed parts and gets them welded and unanchored :smile: