|
| 04 Oct 2015 05:24 PM |
So, it's a pain in the booty to have to mess with the C0 and C1s of a motor weld to get it in the right position. How can I take two parts that are already properly positioned and weld them with a motor weld?
i make u math.sqrt() |
|
|
| Report Abuse |
|
|
| 04 Oct 2015 05:47 PM |
I grabbed this off the wiki;
It welds together two existing parts in their current positions. I believe you'll be able to modify it for your purposes.
local function weldBetween(a, b) --Make a new Weld and Parent it to a. local weld = Instance.new("ManualWeld", a) weld.Part0 = a weld.Part1 = b --Get the CFrame of b relative to a. weld.C0 = a.CFrame:inverse() * b.CFrame --Return the reference to the weld so that you can change it later. return weld end |
|
|
| Report Abuse |
|