CustomiseHolder.Accessories.ChildAdded:Connect(function(accessory)
wait()
local Attach0 = accessory.Handle:FindFirstChildWhichIsA('Attachment')
print(accessory)
print(Dummy)
print(Attach0)
local Attach1 = Dummy:FindFirstChild(Attach0.Name, true) --Does this result as nil?
print(Attach1) --Print to check if this is nil
local Weld = Instance.new('Weld')
Weld.Parent = accessory.Handle
Weld.Part0 = Attach0.Parent
print(Weld)
Weld.Part1 = Attach1.Parent -- ERROR HERE
Weld.C0 = Attach0.CFrame
Weld.C1 = Attach1.CFrame
accessory.Parent = Dummy
end)
It looks like Attach1 might not find anything in the Dummy. Print(Attach1) to see if it results as nil.
Please correct me if I’m wrong, but when I read your code I saw that you’re setting the weld’s Part1 to the Parent of Attach1, which is “Dummy”. I’m not sure if this was intentional or not, so just making sure
local Attach1 = Dummy:FindFirstChild(Attach0.Name, true)
The second parameter on FindFirstChild, when set to true, makes it search recursively through all descendants. It could be right underneath the dummy like you said, but it could be much deeper. In this case it’s likely that it found something like this: