Part still sliding on an angle even if setting part's assembly velocity to 0

So I’m trying to make a part to not slide on an angle wedge. I set part assemblylinearvelocity to 0 and it still sliding. How do you fix that issue?

2 Likes

The question is, does the assemblylinearvelocity actually set to 0 or does it set to something close to 0?

2 Likes

I set its value to 0. Vector.new(0,0,0)

1 Like

I use stepped update loop to set the velocity each frames

I think sometimes it’ll automatically change to something like 0.02871 or whatever instead of the Vector3 you set. To check this, look in the properties panel after you’ve changed it.

Well I checked it and it doesn’t work at all when I set my part velocity to 0 through script update loop

Another thing you should know is if you’re already in the properties panel while the velocity is changing is that I don’t think it’ll update in the properties when you have properties open, but just close is and then re open it and then it should change.

It only slows the part down. I think it’s probably gravity that caused this but I’m not really sure

You could try looking into Vector forces, linear velocity or some other instance.

So changing velocity to 0 though script in update loop doesn’t work then?

It should, but depending how the part is I think the velocity would be automatically change to some silly decimal number.

Increase the Friction of both items.
Or decrease the Density of the Part on the slope.

Just setting the AssmelbyLinearVelocity to 0 only starts it at that value. If the item is reacting to any physics in the game then it’ll instantly change to whatever the physics sets it at.

If you want it to stay in Position why not Anchor it?

I’m trying to make like a car part that doesn’t slide at the right direction of the slope. So if I anchored it, it would stop the car entirety and the motion won’t be stable. I just only want to remove unnecessary velocity on the right direction while the car stops

Also customphysicalproperty is set to false and how come it still reacts?

So you want a car that won’t slide down a hill when it stops?

  • Increase the Friction of the wheels.
  • Set the MotorMaxTorque value of the wheel axle HingeConstraints fairly high so the hinges don’t rotate when the car stops and act like brakes.
  • Decrease the Density of the car chassis and body Parts so they don’t have the mass to pull the car down the slope due to gravity.