the script below is supossed to dash the player to the left when double tap on A. what it does is not that, it dashes the player to the front. can anyone help me?
local plr = game.Players.LocalPlayer
local Char = plr.Character or plr.CharacterAdded:Wait()
local UserInputService = game:GetService("UserInputService")
local Tapped = false
local cd = false
UserInputService.InputBegan:Connect(function(Input, GameStuff)
if cd == false then
if GameStuff then return end
if Input.KeyCode == Enum.KeyCode.A then
if not Tapped then
Tapped = true
wait(0.3)
Tapped = false
else
Char.HumanoidRootPart.Velocity = Char.HumanoidRootPart.CFrame.lookVector*330
cd=true
local Animation = plr.Character:FindFirstChild("Humanoid"):LoadAnimation(script.Animation)
Animation:Play()
wait(2.5)
cd = false
end
end
end
end)