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()
✓ ANSWER ACCEPTED
How do you find all the welds in one model?
1 answer
✓ Accepted answer
local Model = workspace.Model
for _,Weld in pairs(Model:GetDescendants()) do
if (Weld:IsA("Weld") then
Weld:Destroy()
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Thank you very much
Your code had an error but I fixed it. Thanks again
It doesn’t?
in the "if (Weld:IsA("Weld") then " part it should be "if (Weld:IsA("Weld")) then