How to have LinearVelocity always negate gravity?

linear velocity is very weird…

I have a part that uses Linear Velocity to constantly move itself forward while not being affected by gravity, which works fine, but then there’s another part that uses the same LinearVelocity stats and also (im pretty sure) that the part has the same properties besides mass but its still effected by gravity

then i also have a linear velocity inside a player (for a dash spin attack thing) which works fine on the ground, but the player is yet again affected by gravity while also gaining a extreme velocity boost when they are in the air (i dont want that)

below are videos of each
1st one is the one that works exactly how i want it to (not effected by gravity or anything)
2nd one is the part that is effected by gravity for some reason
3rd is the player that is effected by gravity and gains velocity when in the air.

--1st

– 2nd

– 3rd

1 Like

If a part has a higher mass then that means its heavier than the other part, which means you need more force to push it.

Basically just turn the MaxForce of the y axis on the linearvelocities up and it won’t be affected by gravity

2 Likes

thank you this worked but it still adds velocity when player isnt on ground, but ima try using assemblylinearvelocity on the humanoidrootpart that’ll probably work

1 Like

The reason why you’re much faster in the air than ground is probably because the friction of the ground is very low (so when you walk it’s as if ur slipping / struggling to walk) while when you’re in the air, since there’s no surface holding you back you’ll be able to move much more freely.

To fix this just have a loop in your script when adding the force checking your humanoid’s floormaterial and if its air then just destroy the linear velocity (remember to disconnect / break your loop afterwards)

1 Like

i used a bodyvelocity inside the humanoid root part with P set to math.huge and maxforce set to vector3.new(math.huge) then set velocity to the lookvector of the cframe of the humanoid root part multiplied by a number and it worked good

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.