I believe your problem lies here. (Mouse.Hit.p-Character.RightUpperArm.Position).unit
CFrames deal in local coordinates, you will need to convert this expression into a direction that is relative to the character rather than to the world.
aaaaaaaaaaaa sorry for necroposting but I’m currently facing the same problem, but on an R6 rig. I’ve been spending hours trying to edit the code above to no avail.
Does anyone happen to have a snippet of code to do this for shoulder joints on an R6 body?