Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

this is a sever script Unable to assign property Part0. Object expected, got table?

function weld() local parts = {} local last = {} local function scan(parent) for _,v in pairs(parent:GetChildren()) do if (v:IsA("BasePart")) then if (last) then local w = Instance.new("Weld") w.Name = ("%s_Weld"):format(v.Name) w.Part0,w.Part1 = last,v w.C0 = last.CFrame:inverse() w.C1 = v.CFrame:inverse() w.Parent = last end last = v table.insert(parts,v) end scan(v) end end scan(script.Parent) for _,v in pairs(parts) do v.Anchored = false end end

weld() script:Remove()

1 answer

It is very clear... Your trying to assign the table 'last' To the part0

This discussion is preserved as it was. New answers, comments, and votes are closed.