I am trying to make the right arm point to what the camera is looking at while holding an item. The arm should rotate only up and down, not right and left or something. Here is an example:
EDIT: Forgot to mention that this is in R6
I am trying to make the right arm point to what the camera is looking at while holding an item. The arm should rotate only up and down, not right and left or something. Here is an example:
EDIT: Forgot to mention that this is in R6
I never did this yet but try to use CFrame.LookAt
to change the C0
property in Motor6d of your RightArm.
You can adjust the shoulder Motor6D to do this.
local Shoulder = character:WaitForChild("RightUpperArm"):WaitForChild("RightShoulder");
local DefShoulderC0 = Shoulder.C0;
-- In render stepped
local angle = math.asin(camera.CFrame.LookVector.y);
Shoulder.C0 = DefShoulderC0 * CFrame.fromEulerAnglesYXZ(angle, 0, 0);
This should work
How would I do that with R6? I forgot to mention that
In R6 the Torso has the Motor6Ds, the one you need is called “Right Shoulder”. Everything else should be the same
Okay, I found the 6DMotor but it didn’t work. It just spins the arm around