So i wanted to weld every part inside my gun using script and don’t do i manually.
I did this:
for _, u in pairs(game.ReplicatedStorage.weapons:GetChildren()) do
local receiver = u:WaitForChild("receiver")
for _, v in pairs(u:GetDescendants()) do
if v:IsA("BasePart") then
v.CanCollide = false
v.Anchored = false
local weld = Instance.new("Weld") --Also tryed WeldConstraint
weld.Part0 = v
weld.Part1 = receiver
weld.Name = weld.Part0.Name.." > "..weld.Part1.Name
weld.Parent = v
end
end
end