domi_AU
(domi)
#1
How do I make a Motor6D from a script that doesn’t move the Motor6D.Part1?
This is what I mean when I say “from a script” :
local m6d = Instance.new("Motor6D", Part0)
m6d.Part0 = Part0
m6d.Part1 = Part1
I’ve seen something about Motor6D.C0 but I dont understand.
MyDeadUser
(MyAlternativeUser)
#2
I dont really have alot of expirience in scripting but could you state what you mean? do you want the part1 to stand still while part0 is rotating?
domi_AU
(domi)
#4
This is what I want to achieve
This is what happens :
before :
after :

This is what I want to happen :
before :
after (but when moved, part1 follows.) :
You can do this easily with rig editors, but I want to do this from within a script
MyDeadUser
(MyAlternativeUser)
#6
Im not familiar with motors and stuff but you could try this (not guaranteed to work)
local part2Position = Part2.Position
Part1.Position = part1Position
Part2.Position = part2Position```
MyDeadUser
(MyAlternativeUser)
#7
oh yea keep the first script too
domi_AU
(domi)
#8
that doesn’t work, it automatically teleports itself back to the default motor6d position
MyDeadUser
(MyAlternativeUser)
#9
oof. Sorry. if that didnt work then idk what else to do
nonamehd24
(nonamehd24)
#10
You would do it like this
local m6d = Instance.new("Motor6D", Part0)
m6d.Enabled = false
m6d.Part0 = Part0
local pos, pos2 = Part0.Position, Part1.Position
m6d.Part1 = Part1
m6d.C0 = CFrame.new(pos2 - pos)
m6d.Enabled = true