I'm trying to make it where it will add shoulder pads to the upper arms of the character, but the weld won't become a descendant of any meshpart or be attached to one. I'm assuming since MeshParts is kinda new.
The script does work for baseparts, just not for meshparts, anyone know the issue here?
game.Players.PlayerAdded:connect(function(plyr)
local dummy = script.Parent;
plyr.CharacterAdded:connect(function(char)
local parts = dummy:GetChildren()
for i,v in pairs(parts) do
if v:IsA('BasePart') or v:IsA('MeshPart') then
local equipment = v:GetChildren()
for i,v2 in pairs(equipment) do
if v2:IsA('BasePart') or v2:IsA('MeshPart') then
local offset = v.CFrame-v2.Position
local part = v2:Clone(); part.Anchored = false; part.CanCollide = false;
local limb = char:WaitForChild('HumanoidRootPart')
part.Parent = limb
print(part.Parent,part.Parent.Parent)
local weld = Instance.new('ManualWeld',part)
weld.Part0 = part--char:FindFirstChild(v.Name)
weld.Part1 = limb
weld.C0 = CFrame.new(0,0,0)-offset.p
end
end end end
end)
end)
