Scripting Helpers is winding down operations and is now read-only. More info→
Log in to vote

How to make a W A S D dash system?

Asked by 1 year ago
Edited by T3_MasterGamer 1 year ago

I want to make a WASD Dash System however all the things I tried didn't work. I already have created animations for ASD and I want no animations for W. All I want is a simple teleport into your direction and set the animation based on it. It would also be great if it would have I-Frames.

I saved the animations into a folder called "Dash" in ReplicatedStorage. The names are DashL, DashR and DashB, for Left, Right and Back respectively.

I also want to implement some anime teleport particles (like this: . They are going to be just simple particles eminating from the player. Nothing special.

Here is the code I tried using. Instead of teleporting, it just gives a speed boost.

local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")

local DashL = Humanoid:LoadAnimation(ReplicatedStorage.Dash.DashL)
local DashR = Humanoid:LoadAnimation(ReplicatedStorage.Dash.DashR)
local DashB = Humanoid:LoadAnimation(ReplicatedStorage.Dash.DashB)

local Properties = {
    Velocity = 50,
    Duration = 1,
    Keybind = Enum.KeyCode.Q,
    LastDash = tick(),
    Cooldown = 1,

UserInputService.InputBegan:Connect(function(Input, GameProcessedEvent)
    if Input.KeyCode == Properties.Keybind then

        if tick() - Properties.LastDash >= Properties.Cooldown then
            Properties.LastDash = tick()

            if Input.KeyCode == Input.KeyCode.A then
                DashL:Play() elseif Input.KeyCode == Input.KeyCode.D then
                                        DashR:Play() elseif Input.KeyCode == Input.KeyCode.B then
                                                                DashB:Play() end

            local BodyVelocity ="BodyVelocity")
            BodyVelocity.MaxForce =,1,1) * 500000
            BodyVelocity.Velocity = Character.HumanoidRootPart.CFrame.LookVector * Properties.Velocity
            BodyVelocity.Parent = Character.HumanoidRootPart


We can't make a whole script for you but if you could show the script that failed we could help. Puppy_lovertheawsome 84 — 1y

Answer this question