Rotate one part while keeping it in the same (changing) position as another

I have two parts, base and base_2. I’m making a custom character, and my goal is to set it up so that base_2 is “glued” to base, but can rotate freely (it stays in the same position as base). (Specifically, I’m changing the orientation of base_2 in a script by manipulating its CFrame.) Base is unaffected by any movement from base_2. I tried setting things up with motors but couldn’t get it to work (base simply changed orientation with base_2). Help would be greatly appreciated. Here’s a visual of what I’m trying to accomplish:

There is a Constraint called a BallSocketConstraint which can achieve that effect

1 Like

Were you using Motors, or HingeConstraints?
As @LukaDev_0 said, a BallSocketConstraint allows it to spin around at the same Position as base, but if you want it to stay at that angle you could put a HingeConstraint in base and put the other Attachment on base_2 because the Attachment will align with the first Part, not the second.
If you use a BodyGyro you could use the BallSocketConstraint and the BodyGyro could be set up to align base_2 to one angle.

2 Likes
External Media

I took your advice and used a HingeConstraint. The results were pretty close to what I want, but you can see things get kind of glitchy. I’m printing out the angle that base_2 is being set to by my script in the output. For the hinge, LimitsEnabled is set to false and ActuatorType is set to none. I’m not too familiar with constraints - any idea what might resolve this?

If you’re using a BodyGyro it should be taking care of the Positioning.
You may want to set the ActuatorType to Servo and the limits to +15 and -15 degrees, then use your script to set the TargetAngle.

1 Like