I am currently trying to get the arm of an R15 dummy to look at a certain point in the workspace. I am trying to do this using the Motor6D joints as opposed to changing the cframe of each part directly and thats where Im running into issues. My code works in some cases but in others, it just looks completely weird.
Here is a video of what is going wrong.
Another issue I have noticed is that in the cases where the arm does move correctly, the arm is not lining up properly with the red brick. Instead, half of the brick is extending beyond the side of the arm as you can see in this picture. I want the center of the arm to point to the center of the brick
Does anyone know how to properly point the arm of you character correctly using the Motor6Ds?
Here is my current code
objectSpaceTarget = self.Joint1.Part0.CFrame:ToObjectSpace(CFrame.new(targetPosition))
self.Joint1.C0 = CFrame.new(self.Joint1.C0.p, objectSpaceTarget.p) *CFrame.Angles(math.pi/2, 0, 0)