SIayec
(Daniel)
January 8, 2022, 4:19pm
#1
Sorry the title is confusing, I have a few pictures to show what I mean -
Starts off with a Part that is Connected to a Basepart by Motor6d
Then, The Motor6d is deleted. A new Motor6d is created and connected to a new BasePart. The part stays in the same place.
However, I don’t know how to do this… Please help me!
Motor 6d has properties part0 and part1 use them to achieve your goal.
For example:
local startPart
local part2
local part3
motor6d.Part0 = startPart
motor6d.Part1 = part2
--------------------------------------
motor6d.Part1= part3
SIayec
(Daniel)
January 9, 2022, 11:25pm
#3
I want it to stay in the same place it was before. This will move the part3 to the startPart
SIayec
(Daniel)
January 10, 2022, 12:03am
#4
Okay I found it
local w = Instance.new("Motor6D", p1)
w.Part0 = p1
w.Part1 = p2
w.Name = p2.Name
w.C0 = c0 or p1.CFrame:inverse() * p2.CFrame
w.C1 = c1 or CFrame.new()
return w