So basically, I need to insert a whole bunch of constraints, there are like 60 parts so if i was to do it manually it would take a long time. I tried using a for loop but it doesn't appear to be doing anything:
for i,v in pairs(pet:GetChildren())do
if v.Name ~= "Hitbox" and v:IsA("BasePart") then
local constraint = Instance.new("WeldConstraint")
constraint.Name = "WeldConstraint"
constraint.Parent = script.Parent:WaitForChild("Hitbox")
constraint.Part0 = script.Parent:WaitForChild("Hitbox")
constraint.Part1 = v
end
end
Basically, what this script is supposed to do, is that, in the model, it gets the children of the model, then for every part, it will create a weld constraint in the hitbox part, witht the hitbox being the first attatchment and the part as the second attachment. There are no errors, but i don't think it's working. The model is in replicated storage because i need to clone it.
Is there a way to make this script work, or a quick way to manually do it?
Thanks!!!

1 comment
Unfortunately, i need Weld constraints. Is there a way to do this?