Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you find all the welds in one model?

I'm trying to make something so that when you press a part, it deletes all the welds in one model. What is the script to find the welds so that you can use :Destroy()

1 answer

✓ Accepted answer
local Model = workspace.Model

for _,Weld in pairs(Model:GetDescendants()) do
    if (Weld:IsA("Weld") then
        Weld:Destroy()
    end
end

4 comments

0

Thank you very much

0

Your code had an error but I fixed it. Thanks again

0

It doesn’t?

0

in the "if (Weld:IsA("Weld") then " part it should be "if (Weld:IsA("Weld")) then

This discussion is preserved as it was. New answers, comments, and votes are closed.