okay thank you all for providing suggestions but I solved the problem. It turns out the player’s rotation speed went crazy high when they hit the wall when dashing. I don’t know why, but this flung the player when they hit a wall.
I have a script where if there is tool equipped then it automatically does shift lock, preventing the player from rotating unless the mouse moves. It used an AlignOrientation
object which constantly set the orientation of the player to not rotate based on whatever physics happens arounds the player. I just added the AlignOrientation
object to the player’s humanoid root part during the time they dash, so they won’t rotate and be flung into the void.
You can also use humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
to prevent the same thing from happening.