I’m trying to make a snake creature, one that independently moves back and forth to set destinations, and basically, I have done that, but I used BodyGyros, a deprecated asset that at any time Roblox can say “nah doesn’t work anymore” to. Everyone tells me “use AlignOrientation”, but AlignOrientations don’t do what the BodyGyro does for this.
Basically, the way I’m using it is to prevent the snake critter from rolling on its sides, and also consequently preventing it from tilting up and down, while all I really need is for preventing it from rolling.
I’m not sure if I could come up with an example of how AlignOrientation could be used for anything, but it sure doesn’t do what I need, at least not without causing irreparable trouble.
BodyGyro is simple, you put it in the part, and it does its job. AlignOrientation is not simple, you put it in the part, tweak everything to make it do what the internet says is gonna make it work, and it causes it to spin out and fly into space or whatever.
I just need something to prevent my snake’s segments from rolling, does anybody know where I can get something to do that?
You can consider using BodyAngularVelocity instead. BodyAngularVelocity applies a torque to the part, which causes it to rotate, similar to how BodyGyro works. However, keep in mind that BodyAngularVelocity is a bit more complex to use, as you need to manually calculate the angular velocity based on the desired rotation speed.
Another option is to use a Constraint system, specifically a Motor6D or a Spring6D, to achieve similar rotation effects. These constraints allow you to control the rotation of parts in a more flexible and precise way.
Guessing that you’ve provided as much detail as possible, I could recommend further However, and if you’re looking for something more specific that prevents rolling, you might want to explore the idea of using a SpringConstraint or a BallSocketConstraint with some tweaks to achieve the desired behavior.
That itself it deprecated as well, and AngularVelocity, as you did say, is quite a lot more complex. It’d be great for a more hard-coded solution, but BodyGyro does it hands-free with nothing but properties, they wouldn’t deprecate something and not have any good replacement, right?
I think the best solution is to simply inject BodyGyros into everything necessary via script, and if it ever breaks, cross the bridge when it happens, and I’ll be able to easily replace it by just editing the one script.