So what I'm trying to do is make it so if two blocks touch when I run the game, they weld together I successfully got it however the welds aren't consistent, such as one side isn't welded to another. Here's what I have so far:
local block = script.Parent
block.Touched:connect(function(hit)
if hit:FindFirstChild("values") and hit.values:FindFirstChild("isabrick") == true then
local newWeld = Instance.new("Weld")
newWeld.Part0 = block
newWeld.Part1 = hit
newWeld.Parent = script.Parent
else
print("hit is not a valid block")
end
end)
Some sides don't weld to other blocks like so:
prntscr.com/iwsylp
