How to get all parts that are touching surfaces like join surfaces tool works?

I want to make so when I generate room, it automatically welds with surroundings, like join surfaces.

Screenshot 2023-07-18 120410
Screenshot 2023-07-18 120640

Screenshot 2023-07-18 120442

I have tried :GetTouchingParts(), doesn’t seem to work very well.

Use radius to detect the radius between the player character so if its in the right amout you generate it.

No, i want to make something simmilar to joun surfaces tool in model section so i can weld it in place.

try using

local filter = OverlapParams.new()
filter.FilterType = Enum.RaycastFilterType.Exclude
filter.FilterDescendantsInstances = {}

local parts = workspace:GetPartsInPart(part, filter)
print(parts)

there is a documentation for the workspace and its functions. you can check it out here:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.