Make a tool that makes you dash forward on use

im trying to make a tool that dashes you forward when you use it, but ive tried most of the forces and none of them work how i want them to

i would like it to work like they do in Critical Strike, in which you can turn with WASD or shift lock without losing much speed but cant stop

bodyvelocity works alright but it doesnt let me turn

vectorforce works when using the BodyFrontAttachment and relative to attachment0 but the animation used by the dash makes it fly upwards

1 Like

I’m gonna wing it and try write the script here, so if there’s any issues with my code, just reply with the problem so I can debug it:

local Player = game.Players.LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:Wait();

local Tool = script.Parent; -- localscript in tool

local BodyVelo = Instance.new("BodyVelocity");
BodyVelo.MaxForce = Vector3.new(math.huge, math.huge, math.huge);

BodyVelo.Parent = Character.HumanoidRootPart;

-- configs --
local Speed = 20;
local Duration = .3; 

local debounce = false;

Tool.Activated:Connect(function()
    if debounce then return end;
    debounce = not debounce;

    BodyVelo.Velocity = Character.HumanoidRootPart.CFrame.LookVector * Speed;

    task.wait(Duration); 

    BodyVelo.Velocity = Vector3.new(0, 0, 0);
    debounce = not debounce;
end)

I don’t have access to any IDE or Roblox Studio right now, but I’ll do my best to help.

1 Like

Try using linear velocity and making the velocity go in the direction of humanoidrootpart.CFrame.LookVector. Afterwards, you can destroy it after a few seconds, creating the dash effect.

If you’d like for it to turn, you could try adding an attachment to humanoidrootpart and attach linear velocity. You can set the force’s RelativeTo property to your attachment (usually attachment0). You can just do what I said above to create the effect again.

1 Like

i played around with this and got it to move without turning, but if you run into anything you start spinning around
ill try and see if i can get it to turn
thanks for the help!

i tested it and the humanoidrootpart doesnt move with animations which i didnt know but that makes this much easier, thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.