| |
|
|
| 23 Aug 2017 03:04 PM |
weld.Part0 = game.Workspace.Part1; weld.Part1 = game.Worspace.Part2;
weld.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,0,0)
|
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 23 Aug 2017 03:05 PM |
local base = script.Parent.basepart local p = script.Parent:GetChildren() for i = 1, #p do if p[i]:IsA("BasePart") then local w = Instance.new("Weld", p[i]) w.Part0 = p[i] w.Part1 = base w.C0 = CFrame.new() w.C1 = base.CFrame:inverse() * p[i].CFrame p[i].Anchored = false end end
i made this one to weld all the parts of a model to a central part in the model, called "basepart".
|
|
|
| Report Abuse |
|
|
|
| 23 Aug 2017 03:07 PM |
| Weld? If you want to weld for example 2 blocks together, each 1X1X1 the old-style way, go to the top Studio bar and click that surface wand thing, click "Weld" and click the top of ################ ################ ################ ################### of another and stick them together. You have to be on at least an 0.1 stud grid in order for it to be accurate. The other way in doing it is using a script weld. Usually MasterWeld and qPerfectionWeld works best. |
|
|
| Report Abuse |
|
|
LaeMVP
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
|
| 23 Aug 2017 03:10 PM |
local Base = ??? for i,v in next, script.Parent:GetChildren() do local Weld = Instance.new("Weld") Weld.Part0 = v Weld.Part1 = Base Weld.C0 = Base.CFrame:toObjectSpace(v.CFrame) Weld.Parent = v end
i thunk |
|
|
| Report Abuse |
|
|