a splitter script where when touched will destroy any welds in the part that touched it
return function()
script.Parent.Touched:Connect(function(t)
if t.Name == "Pushbox" and t.Parent.Name or t.Parent.Parent.Name == "DualityPushboxSpawnButton" then --seeing if the part touched is named 'pushbox and the parent's name of the pushbox is 'DualityPushboxSpawnButton'
for i,v in pairs(t.Parent or t.Parent.Parent) do
if v.Name == "WeldConstraint" or "Weld" then
v:Destroy() -- seeing if the dualitypushboxspawnbutton contains any welds, and destroys them
end
end
end
end)
end
Image of what will be touching the splitter
https://gyazo.com/75e3ba528847c1466eb4d6aa01c2265f
Image of error
