So, I am writing a weld script for my rollercoaster car, and I will be able to use it for everything else. Anyway, It works, but for some reason, every piece go all weird, into weird places, but only on certain parts, not every piece. The code:
function weld(base, group)
for i, v in pairs(group:GetChildren()) do
if v ~= script.Parent.Welds then
local w = Instance.new("ManualWeld")
w.Parent = base
w.Part0 = base
w.Part1 = v
w.C0 = (base.CFrame-v.Position)
end
end
end
weld(script.Parent.Brake, script.Parent)
I am not sure what is wrong... Any solutions, maybe?

2 comments
edit so that is works please, i think you messed up the code block thing
so do i... i thought i was just my computer at first.