Rotational point between two parts?

Hello, I’m looking for a way to make a sort of point between two parts which the part will rotate around, like: I weld the part to a player arm and it will copy movements limited by that rotational point. Else I need a good model animator and instructions. So I need that rotational point and a weld tha copies only rotation.

Like a robot that copies player’s movements, so I need like this: RightHand, welded to RightLowerArm and that copies rotation from the player’s hand.

Shouldn’t this be in #help-and-feedback:scripting-support?

You can use math.atan2 to quanitfy the angle needed from two given points. If you imagine that you have a circle and the origin is in the middle of this circle. And then we have another point (A for convenience). Then we need to get the X and Y coordinates for both of these points to input in the math function so that it can return the angle in radians.

The angle is always = math.atan2(y2-y1, x2-x1).

And then the hand would maybe be

hand.Orientation = Vector3.new(0,0,math.deg(angle)) – Play around with this :slight_smile:

So actually that is a good solution, but what if like I want to copy all player’s movements, like if I play an animation in player and it applies in model, is there a way like to keep welded a limb to another limb and weld it to player’s bodypart too, from where it will take rotation?

Depends on the animation the player can exhibit. If it is a standard animation, I don’t see why you can’t treat this robotic as an NPC and have it play the same animation as the player.

That is the problem, I actually don’t know how to animate a model, they removed custom character beta from plugin shop, so I was looking for a good alternative. Another question too, how do you get that rank next to name?

Wait, in my model there are some main part which otherparts of that limbs are welded to, if I make an r15 model like this, will it work? I mean the animator.

Alright, then you’ll have to use something called inverse kinematics (learned this recently).

Say we have 3 points. Shoulder, elbow and wrist. These needs to be joints, we can actually apply their rotation by using the cosine-rule.

You can find more about this over here: Robotic Arm Inverse Kinematics - #2 by IdiomicLanguage as myself isn’t proficient in the area enough to explain it.

So I can use a motor 6d and a weld, the weld will be attached to the otherpart of the limb, the motor6d to player arm?

What you do is that you record a player’s shoulder angle. And then you determine the other joints’ CFrame for the robotics.

I’ll try this out, thank you so much.