Make a wall extend to another wall (...to fill a gap) under a certain condition

Hey guys! I am currently making a wall placement system and I am trying to replicate a thing from bloxburg as shown in the picture below:


The picture displays that a wall model has two parts inside. That is what I am trying to outline. Where the different colours represent either inner or outer(… such as yellow/orange and respectively for outer would be green/red)

I have a placement system where I ‘draw’ the walls by instancing a part relative to the two given points that gets created upon this function.
An example code shown below:

Now onto accomplishing what I want. It would require for me to store poles/points in a table and when two points intersect (… probably by using runservice in combination with :GetTouchings), I will have to determine 2 things.

  1. Is it either the outer-walls that needs to resize (Green and red) or the inner walls (yellow and orange) - I can do this by looking at the angles but I am stumbling on how to accomplish this because I am not familiar with this area.
  2. Now when have determined this, only one wall needs to extend but I have no idea how to re-(position/adjust size) my wall to accomplish this task.
2 Likes

I’m a bit confused, are you trying to have this happen at runtime? Or is this a helper for your building?

If its the latter, there’s a plugin that I use to help me resize parts to intersect with other parts called ResizeAlign.

https://gyazo.com/0358b76fa76c29bded6fcf99f153fbd0

If you need it to work at runtime, then you can once again install the plugin, then go to
%localappdata%/Roblox/InstalledPlugins/165534573
and try and reverse-engineer the code used in the plugin.

Hope this helps!

2 Likes

I’d still have to determine which sides of the wall that needs extending. Extracting a piece of code from that plugin isn’t what I am looking for.