So I have this weld script, and it welds EVERYTHING, which is what I want right? But theres 1 specific thing I don’t want welded and its named “WheelPart” how do I make it so it welds everything but that? when I do “and not v.Name == “WheelPart” then” it just breaks, any help?
local P = script.Parent local mainPart = P.Parent.Driving.Base local weldedParts = {} table.insert(weldedParts,mainPart) function Weld(x, y) weld = Instance.new("Weld") weld.Part0 = x weld.Part1 = y local CJ = CFrame.new(x.Position) weld.C0 = x.CFrame:inverse() * CJ weld.C1 = y.CFrame:inverse() * CJ weld.Parent = x table.insert(weldedParts,y) end function WeldRec(instance) local childs = instance:GetChildren() for _,v in pairs(childs) do if v:IsA("BasePart") then Weld(mainPart, v) end WeldRec(v) end end WeldRec(P) --WeldRec(P.Parent.Lights) for _,v in pairs(weldedParts) do if v:IsA("BasePart") then v.Anchored = false end end script:Destroy()