Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to duplicate part rotation and translate to Motor6D rotation?

Asked by 5 years ago

Hello everyone, I'm trying to edit a R6 character's neck motor6d to rotate along with another part I have in the character. I'm attempting to have the neck motor just copy the rotation on every angle, but it is behaving strangely.

local neck = script.Parent.Torso.Neck
local aim = script.Parent.aim

while wait() do
    local x,y,z = aim.CFrame:ToEulerAnglesXYZ()
    neck.C0 = CFrame.new(0,0.5,0) * CFrame.Angles(x,y,z)
end

I've googled for a few hours about this and came up with nothing, any ideas?

Answer this question