How do I achieve same distance dashing?

I have a dashing script and yes it does travel the correct distance using body velocity however once the bodyvelocity is deleted the remaining velocity gets lost when touching the ground. but in mid air there is nothing that will slow down the velocity so it keeps it going.

Probably like this: how do I make dashing in mid air the same as ground without losing velocity?

[Screen capture - d2da641f718d1452fedb9a41e51cc85d - Gyazo ]

Dash in air:
[Screen capture - 4005e53d1f05f6669ef8128527743d2b - Gyazo ]

not setting humanoidrootpart.velocity = 0

Probably due to how the workspace's gravity works

Could you try increasing your MaxForce property?

max force is already high enough there isn’t any friction when body velocity is running, once it gets deleted then the humanoidrootpart has remaining velocity and it gets lost due to the grounds friction but in midair it doesn’t slow down cause theres no friction. how would you keep it going to same distance without setting humanoidrootpart velocity to 0???

1 Like

Try setting the Y property to zero, and the rest to a high number

You could possibly move away from body movers and swap to raycasts.

= RayCasting & Dashing =

When the player wants to dash you can send a raycast in the direction of the dash, with raycasts you can choose to set a limit on distance.

When the ray hits a wall it will stop there and you can teleport the player to that point.

Assuming the dash isn’t super far away, this teleport won’t be noticeable and it will look like a real dash.

It’s as simple as

local limit = 50
local raycastResult = workspace:Raycast(Character Position,, 0, 0)) -- You would make if statements that change the direction, such as -limit for left.

This gives RaycastResult.Position and RaycastResult.Instance. So you can even make choices on what happens when the player dashes into something. Like breaking a crate.

API Reference:

Hope this helps!
~ Xitral, programmer


Maybe this will help: Animated Dodge Raycasts - Roblox