Replacement for BodyPosition?

Before you reply with AlignPosition, Plane, or PrismaticContraint hear me out. Since BodyMovers have been depreciated I have been searching for a replacement for my BodyMovers. My use of BodyPosition relies on the Maxforce property being a Vector3 and I have yet to find a replacement for it. I need to apply a restrictive force to all 3 axes, but to different degrees. For example, my game has lily pads that players can jump on. They need to be heavily restricted on the X and Z axes so they do not get pushed around, but I want them to have a little bit of give when a player jumps on them so they bounce a bit. I do a similar thing with other floating objects. I cannot achieve this effect with AlignPosition because of the single maxforce. Is there any other reasonable solution for this issue or am I just stuck hoping these don’t break from an update anytime soon.

1 Like

Either use a VectorForce, or use a PrismaticConstraint with a SpringConstraint.

AlignPostion

your best bet is probably LinearVelocity. you can set its VelocityConstraintMode to Line, which allows you to specify LineDirection and you can think of that as max force. but it’s a unit vector so if you wanted Y axis to have 5 times more force than X and Z you’d set it to Vector3.new(1, 5, 1).Unit. Then you just set the LineVelocity to give it an actual force.

I’m confused, how do I use LinearVelocity to hold an object in place

if you wanna hold an object in place you should go with VectorForce instead. either way you’ll have to do some calculations to achieve the same effect that you had with BodyPosition as there’s no direct replacement for it as it seems.

On the VectorForce | Roblox Creator Documentation page you can download this place to see the VectorForce and the ways you can set it up:
Body Movers Example.rblx

1 Like