Dashing into walls

im trying to make a dash but when you dash into a wall you fly around and fall over, ive tried to use the code

plr.Character.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)

to fix it but when its always runing you can barely walk or jump because of state changing and it won’t work if i have it only when it dashes because its still stuck into the wall when the dash ends.

is there any way i can make it so if you dash into a wall it just stops all momentum instead of making you fly around and fall over.

what are you using to have the player dash?

bodyvelocity and having it decrease slowly over time until the dash is done.

before the player dashes you should raycast in whatever direction theyll be going and check the distance to make sure that its enough for the full dash and if its not use a math equation to calculate how long the body velocity should last for instead of the original time

1 Like

I think a good fix to this would be to use Align Orientation. When you dash you can enable the align orientation to keep you upright or whatever rotation you need.

1 Like