Body Velocity Timing Issues

In my game I like to use body velocity to move the character around for certain skills then attach a magnitude check on a loop to check if the attack would hit or not. This intern creates problems as I can’t stop the velocity, without a somewhat major delay before the effect actually happens(EX: A dash move using Body Velocity in the HumanoidRootPart, with a repeat checking if the magnitude of another player is less then 7 that deals damage and removes the Body Velocity while setting the HumanoidRootPart Velocity to 0, the humanoid continues going past(or pushing) the player even though the damage has been dealt like around or less second ago. I’ve also tried Tweening, but it seems to not really work with humanoid figures especially with Mouse location.

Here’s the example in action:

(As you can see the damage text is quite a bit far behind the player, when the removal and reset of velocity is put in before and the push back is meant to happen, but the player should have stopped around the damage text.)

Anchor all of the parts in the character, not just the humanoid robot part. That way, the other parts attached to the character do not maintain their velocity. Then, unanchor the parts (add a wait before if it doesnt work).

Example:

for i,v in pairs(character:GetChildren()) do
       v.Anchored = true
end
wait()
for i,v in pairs(character:GetChildren()) do
       v.Anchored = false
end

Same thing happens, more or less. I did also try putting a wait before the pairs, but had no difference and I even tried it without un-anchoring as you can see in the gif.

So while moving forward and when you’re ready to remove the BodyVelocity try setting the force of the BodyVelocity to the opposite direction, then removing it while setting the HumanoidRootPart Velocity to 0.

It may seem weird, but I’m drawing from another game’s movement system. If you release the D key in said game the character will continue to move for a second then stop, however if after releasing the D key you tap the A key the player stops moving.