This is the script:
local UIS = game:GetService("UserInputService") local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait()
local debounce = false
KeysDown={}
UIS.InputBegan:Connect(function(input,gpe) if gpe then return end if input.KeyCode == Enum.KeyCode.Q then if not debounce then debounce = true print("made true")
if KeysDown.W then
local animation = Char.Humanoid:LoadAnimation(script.FrontDash):Play()
wait(0.3)
Char.HumanoidRootPart.Velocity = Char.HumanoidRootPart.CFrame.lookVector* 150
elseif KeysDown.D then
--
local animation = Char.Humanoid:LoadAnimation(script.RightDash):Play()
wait(0.3)
Char.HumanoidRootPart.Velocity = Char.HumanoidRootPart.CFrame.lookVector* 150
elseif KeysDown.A then
--
local animation = Char.Humanoid:LoadAnimation(script.LeftDash):Play()
wait(0.3)
Char.HumanoidRootPart.Velocity = Char.HumanoidRootPart.CFrame.lookVector* -150
elseif KeysDown.S then
local animation = Char.Humanoid:LoadAnimation(script.BackDash):Play()
wait(0.3)
Char.HumanoidRootPart.Velocity = Char.HumanoidRootPart.CFrame.LookVector* -150
end
end
wait(2)
debounce = false
print("made false")
end
else
KeysDown[input.KeyCode.Name]=true
end
end)
UIS.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.Keyboard then KeysDown[input.KeyCode.Name] = nil end end)

2 comments
else on line 37 is underlined in red
maybe because there is an "end" right before the else?