I’ve recently been working on a door framework for my game.
It all seemed to work fine, and still does. Except for the fact that as of recently, any new doors don’t work.
I use WeldConstraints to move the objects, and that’s been working fine for me.
But now, whenever I copy any of the doors (even if duplicating, or using ctrl+c; they’re the exact same), the welds fail to work on them.
The welds go inactive without any apparent reason. However, all old doors work just fine. This only happens with new doors.
I’m not sure what’s wrong.
function WeldModel(Main, Weld) if not Main then return end if not Weld then return end for _, v in ipairs(Weld:GetDescendants()) do if v ~= Main and v:IsA('BasePart') then local weld = Instance.new('WeldConstraint') weld.Part0 = v weld.Part1 = Main weld.Parent = v v.Anchored = false end end end
Keep in mind this code has worked since I first wrote it, and still does. The issue is that welds are going inactive for some reason.
Any clues? Anyone else facing the same problem?