How do you get the position of the side of a block so you can place a block perfectly next to the block

Keywords´╝Ü lua roblox


A example, image two blocks,

Part1 and Part2, Part1 is placed in the game as a normal block, while Part2 is placed into the game using a script, then before it gets placed into the workspace, the script gets the side position of Part1 then puts Part2 position as the side of Part1 afterwards then placing it into workspace.

So then Part2 will be perfectly next to Part1.