I made a morph script for a Armor Model I made recently, and for some reason the Weld isnt Welding I’m not sure why. Right arm and both legs work fine but Left arm and torso don’t get welded. with 0 errors.
local class_armor = class_folder:FindFirstChild(equipped_class):Clone()
class_armor.Parent = Character
class_armor.Name = "Armor"
for _,armor_piece in pairs(class_armor:GetChildren()) do
--Armor pieces are named after parts: Torso, Left Arm and are models
if Character:FindFirstChild(armor_piece.Name) then
armor_piece:SetPrimaryPartCFrame(Character:WaitForChild(armor_piece.Name).CFrame);
for _,piece in pairs(armor_piece:GetChildren()) do
piece.Anchored = false
piece.CanCollide = false
piece.Massless = true
--middle is a body part made transparent, they are primary part of armor pieces
if piece.Name ~= "Middle" then
local WeldConstraint = Instance.new("WeldConstraint");
WeldConstraint.Part0 = piece;
WeldConstraint.Part1 = armor_piece.Middle;
WeldConstraint.Name = piece.Name .. " to " .. "Middle";
WeldConstraint.Parent = piece;
else
local WeldConstraint = Instance.new("WeldConstraint");
WeldConstraint.Part0 = armor_piece.Middle;
WeldConstraint.Part1 = Character:WaitForChild(armor_piece.Name);
WeldConstraint.Name = armor_piece.Name .. " to " .. Character[armor_piece.Name].Name;
WeldConstraint.Parent = piece;
end
end
end
end
bug image:
it also ruins the animations, any animation that uses left arm doesnt move left arm.
Always here to answer questions.
