My dash system still has a few flaws

hey guys, I’ve been making a dash system lately, although it’s going pretty well, it’s still having a few problems:

  1. flung upon collision with a weird object
    (Watch weird collision fling | Streamable)
  2. movable using WASD during the dash (I don’t want that to happen)
    (Watch wasd movable | Streamable)
  3. can be affected by heavy tools/objects with mass
    (Watch mass movable | Streamable)

I was thinking of using a “hitbox” that becomes collidable whenever I dash to prevent weird collision flings, but other than that I have no other idea. Also, I would like the player to control the dash ONLY using Shift Lock, not WASD keys. If anyone could help me out, it would mean a lot, thank you :happy2:

1 Like

I think I know why you might be having some of these issues:

  1. Collision flinging
    I believe this is because you might have the maxForce of your velocity set to math.Huge, just set it to a very high number, such as 100000 instead. This also might be happening because your program doesn’t know when you have collided with something. I see you said you might want to use a hitbox to see when you collide with something, I think what you are looking for is Raycasting.

  2. WASD during dash
    For the player being able to move during the dash, just make sure you set the player’s humanoid.WalkSpeed to 0 while you are dashing, and set it back after. That should fix the problem.

  3. Affected by heavy tools
    The tools being able to move the player while they are dashing is not actually an issue with your script, the issue is probably that your tool’s model and descendants have mass. Go through each part inside of the tool and set the Massless property to true.

Let me know if these helped out!

thanks for the tips! but still I have some questions

  1. the MaxForce one kinda worked, but it’s still glitching me out when I’m colliding against a player. this was what I meant when I said “hitbox” that becomes collidable when dashing (sorry, my explaination was unclear, but tbf this method still doesn’t work)
    Watch fling | Streamable
  2. THIS ONE WORKS
  3. THIS ONE WORKS TOO THANK U
1 Like