Dashes longer when on air?

local bv = Instance.new("BodyVelocity")
bv.Name = "BV"
bv.MaxForce = Vector3.new(500000, 0, 500000)
bv.Velocity = humRootPart.CFrame.lookVector * 100
bv.Parent = humRootPart

So this is my dashing script and it works great. But I have a problem, where whenever I jump and dash, it dashes longer or further compared to when the I am on the ground

Any fix for this?

I think thats normal cuz you are on air

Not really, since when you are in the air roblox doesn’t apply friction.

if you want it to go the same as the ground, maybe check if the player is on air, then reduce the multiplier by how much you want

Check if the humanoid state is jumping.

humanoid.StateChanged:Connect(function(old, new)
    if new == Enum.HumanoidStateType.Jumping then
        -- code here (maybe just lower the body velocity)
    end
end)
humanoid.StateChanged:Connect(function(old, new)
    if new == Enum.HumanoidStateType.Landed then
        -- code here (raise velocity)
    end
end)

add HumanoidStateType.Climbing cuz it will be the same velocity if it just climb

try to avoid having to much Connection, use this instead:

humanoid.StateChanged:Connect(function(old, new)
	if new == Enum.HumanoidStateType.Jumping then
		-- code (decrease the velocity multiplier)
	elseif new == Enum.HumanoidStateType.Landed or new == Enum.HumanoidStateType.Climbing then
		-- code (increase the velocity multiplier)
	end
end)
2 Likes

I recommend following this youtube tutorial:

It deals with the issue you have and will save you several headaches later. It will automatically check for any obstructions in the dash direction and pause the dash before collision. Additionally, you can learn from it and write your own.

The other solutions in this thread are very band-aid and don’t tackle the main issue, which is combating friction.