|
| 07 Apr 2014 01:54 AM |
welding = Instance.new("BindableFunction", Workspace) welding.Name = "weld"
welding.OnInvoke = function(types, tab) ps = { ["models"] = function (base, model, angle) for i, v in next, model:GetChildren() do if v ~= base and v:IsA("BasePart")then local cf = base.CFrame:inverse() * v.CFrame() local weld = Instance.new("Weld") weld.Parent = base weld.Part0 = base weld.Part1 = v weld.C0 = cf * angle end end end;
["part"] = function (base, second, pos, cframe) local weld = Instance.new("Weld") weld.Parent = base weld.Part0 = weld.Parent weld.Part1 = second weld.C0 = pos * cframe end } for i, v in next, ps do if i == types then if types == "part" and i == types then print(tab[3]) v(tab[1], tab[2], tab[3], tab[4]) elseif types == "part" and i == types then v(tab[1], tab[2], tab[3]) end end end end
The issue:
You have to move the parts for the weld to make them take position. |
|
|
| Report Abuse |
|