How would I make a model that moves like a worm?

I’m not sure if this needs to be scripted, or if there is a constraint that can allow me to do this, so sorry if this is in the wrong category.

I’m planning on making a worm creature that isnt affected by gravity but still has physics where it follows the segment infront. If that doesn’t make sense, here’s what I mean:
Creating a boss with procedural animation | Prototype Series

(Video starts at where they show it)

1 Like

I would assume you can accomplish this with animating the model to an extent.

1 Like

The basic trigonometric functions (math.sin and math.cos) are useful for making wave patterns.

1 Like

We’re planning on only animating the head for the mouth and then scripting everything else, while the segments just follow the head.

Using constraints to move is my best suggestion

1 Like

What kind of constraint would I have to use, and would I have to change any of its properties?

What’s wrong with animating the entire thing? What do you plan on using it for?

1 Like

I think its way too tedious and inefficient to animate the whole thing.
I’m going to use it for a boss fight in the middle of the ocean.

This should help:
Intro to Constraints – Revolving Doors (roblox.com)
Constraints Available in Studio - Roblox Blog

I’d think animating the whole thing would be much easier then doing anything else because all you have to do is rotate the segments.
Anyways, if you want another option, where I think @alexthecool600 is going with the constraints is to use the ball in socket constraint for each segment so each segment will move freely in a worm like movement. Springs may also be useful to try to move the segments back into their aligned place.

1 Like

You can also use inverse kinematics to do this like what @arlthmetic has done for a wormy like effect.

1 Like

I’m 1 year late for this, but for other people trying to do this, what I ended up doing back then was only rigging the head to be animated, having BallSocketConstraints between each segment, and using BodyVelocities to keep each segment unaffected by gravity. Using inverse kinematics could work instead but I thought it might get laggy.