How to make a model NOT fall over without anchoring it?

I’m trying to get a model to move via a BodyVelocity but I also want it to not tumble around while its moving. This is what i’m using to get it to move.

        local boopyve = Instance.new("BodyVelocity") 
        boopyve.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
        boopyve.P = math.huge
        boopyve.Velocity = rot.CFrame.lookVector * 10 
        boopyve.Parent = rot --- Rot is HumanoidRootPart of the model


The video is above is what happens everytime I disable the weld inside the model(connects model to player) and run the BodyVelocity code. Is there anyway I can edit the code so the model goes forward (without tumbling)? All answers appreciated.

3 Likes

I’m not a builder but I’m pretty sure you have to anchor it. I’ll look and try and find a source.

2 Likes

Couldn’t you just set the Body Parts CanCollide property to false so that it won’t have collisions with everything else? You would need to weld the parts though in order for it to work

I need cancollide to be true so the model won’t be able to phase through players.

Then just by default, change the CanCollide property to false then after like a half a second/second, set it back to true so it’s able to collide with other players

From the video you sent it doesn’t really look like there’s a way around your issue unless if you disable that certain property, or use collision groups maybe

1 Like

Maybe if you set velocity to 0 first?

I can’t set the velocity to 0 because I still need the model to be able to move forward.

oh nvm, I thought that was the problem

Look into a BodyPosition. This BodyMover will move an object toward a certain Vector3 but not affect its rotation.

How should I use a BodyPosition to obtain my goal?

Here’s some example code. Very similar to a BodyVelocity like you were using the only difference is this BodyMover has D which stands for Dampening and instead of velocity is takes a Vector3 position in the world space.

local BP = Instance.new("BodyPosition");
BP.MaxForce = Vector3.new(math.huge, math.huge, math.huge);
BP.P = math.huge;
BP.D = 50;
BP.Position = (position to go to);
1 Like

What you need is a bodyGyro along with a bodyPosition. This will make it so that the stand will only rotate on the y axis.

local bg = Instance.new("BodyGyro")
bg.CFrame = CFrame.new()
bg.MaxTorque = Vector3.new(math.huge,0,math.huge)
bg.Parent = humanoidRootPart
1 Like

I’ll try that. I’ll let you know if it works or not.

I think,you need to add some weld or weldconstraint and maystrong textbe it should work

What should I put in “BP.Position” to get the model to move forward? I’m assuming lookVector won’t work because its position not CFrame.

The Position property takes a Vector3 so the lookVector will work.

I just looked back at your original post since you want the BodyPosition to move in front of rot you should set the BodyPosition’s Position property to:

BP.Position = rot.CFrame.Position + (rot.CFrame.LookVector * 10);

10 is an arbitrary number to increase the distance you can use whatever depending on how far you need it to go.

This is what happened when I used your code


The stand model just disappears completely. The code itself doesn’t error.

You have to change the 10 to a larger value. I said that was an arbitrary number that defines the distance the model will go from its current position.

Weld it to the ground, it shouldn’t move unless the welds aren’t properly put together.