in the game you can dash in your moving direction and every direction has its own animation
this is my current script:
local Keybind = Enum.KeyCode.LeftAlt
local Blocking = false
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid:WaitForChild("Animator")
local InputSerive = game:GetService("UserInputService")
local DashTime = .2
local Force = 70
local Anims = {
["Left"] = Animator:LoadAnimation(script:WaitForChild("Left")),
["Right"] = Animator:LoadAnimation(script:WaitForChild("Right")),
["Foward"] = Animator:LoadAnimation(script:WaitForChild("Foward")),
["Back"] = Animator:LoadAnimation(script:WaitForChild("Back"))
}
InputSerive.InputBegan:Connect(function(Key)
if Key.KeyCode == Keybind then
local Slide = Instance.new("BodyVelocity")
Slide.MaxForce = Vector3.new(1,0,1) * 30000
Slide.Velocity = Humanoid.MoveDirection * Force
Slide.Parent = Character.HumanoidRootPart
wait(DashTime)
game.Debris:AddItem(Slide, 0.1)
for count = 1, 2 do
wait(0.05)
Slide.Velocity *= 0.3
end
end
end)
i figured how to make the dash but can’t figure out how to get the animations