One part does not keep up with the other when using a HingeConstraint

2 Likes

Can you give more information? Because we dont know what exactly you are trying to achieve.

i need to make this tool rotate only on one axis, but it changes its position, and rotates also by all other axis

I had a similar issue before, I ended up using Motor6D’s to weld the parts and rotate if needed.

so if i use motor6D, will the effect be similar to hinge? I mean, will it use force to rotate the part?

No, you can however use the desired angle property to rotate it however you wish.

The Motor6D is mainly used for animating, however it can also be used for builds like yours. To make it as simple as possible you can use this plugin; https://create.roblox.com/store/asset/804263305/Constraint-Editor

You can also do it the other way. Create a new Motor6D and assign part0 to the handle and part1 to whatever part you want to attach it to. You will notice that the part you assigned to be part0 will snap to part1’s position and that is completely normal. You will just have to decrease part0 Y position. It will be a bit tricky but you will get it. To me it seems like the Motor6D’s position thingy has changed a bit. It also used to be that part1 would snap to part0 instead of the other way around. Anyway, continue’ing you will have to mess about with part 0 and part 1 orientation so that it would rotate left and right. Lastly you will have to increase maxvelocity and desired angle properties. Note that the maxvelocity and desired angle properties are way smaller than hingeconstraints. For example maxvelocity set to .1 for motor6D is about 15 speed for hingeconstraints. And around .6 desired angle for motor6D is around 180 degrees for hingeconstraints so you will have to be more precise. Anyway this is about it, good luck with your game!

I tried using Motor6D, but it seems like it’s not using force, it just rotates one part with some speed, ignoring any obstacles

We need more information on what you are trying to make otherwise we cant properly help you :man_shrugging:

So im trying to make sword for my game, and when player swing the sword rotates, but if it hits obstacle it stops, if it hits, for example, part, that hangs on the rope, sword will push that part, etc.