Linear Velocity keeping player in the air while active

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? i want to figure out how to fix the player just floating mid air using linear velocity on dash

  2. What is the issue? i know the issue comes from VectorVelocity.MaxForce , i been told that it can be restricted to work without the Y which is the reason it keeps the player afloat but i dont know how to fix it
    image

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I did and couldnt find anything.

local LinearVelocity = Instance.new("LinearVelocity")
	LinearVelocity.Attachment0 = hrp.RootAttachment
	LinearVelocity.ForceLimitsEnabled = Vector3.new(math.huge,0,math.huge)
	LinearVelocity.MaxForce = 100000
	LinearVelocity.RelativeTo = Enum.ActuatorRelativeTo.World
	LinearVelocity.VectorVelocity = dashDirection * 50 
	LinearVelocity.Parent = hrp

Idk why you’re using the MaxForce property but try this out

local LinearVelocity = Instance.new("LinearVelocity") 
LinearVelocity.Attachment0 = hrp.RootAttachment
LinearVelocity.ForceLimitMode =Enum.ForceLimitMode.PerAxis
LinearVelocity.ForceLimitsEnabled = Vector3.new(math.huge,0,math.huge)
LinearVelocity.VectorVelocity = dashDirection * 50 
LinearVelocity.Parent = hrp

:frowning:

try deleting the LinearVelocity after some time

game:GetService("Debris"):AddItem(LinearVelocity, 1)

I could be wrong but i believe that LinearVelocity can be limited to certain axis with the MaxAxesForce property

Here is some code:

local LinearVelocity = Instance.new("LinearVelocity")
	LinearVelocity.Attachment0 = hrp.RootAttachment
	LinearVelocity.ForceLimitMode = Enum.ForceLimitMode.PerAxis
	LinearVelocity.MaxAxesForce = Vector3.new(math.huge,0,math.huge)
	LinearVelocity.RelativeTo = Enum.ActuatorRelativeTo.World
	LinearVelocity.VectorVelocity = dashDirection * 50 
	LinearVelocity.Parent = hrp
1 Like