Can spam animation but not dash

I’m not sure if this is a big bug but if it is a small bug i’m gonna feel stupid

anyways, this dash script I configured allowed me to spam animations but not spam the dashing.

local UIS = game:GetService("UserInputService")
local char = script.Parent
local plr = game.Players.LocalPlayer
local tool = plr.Backpack.Sword
local slideAnim = Instance.new("Animation")
slideAnim.AnimationId = "rbxassetid://10887657808" -- Enter your AnimtionID
local v4 = plr.PlayerGui:WaitForChild("Main").IsDashing.Value
local keybind = Enum.KeyCode.Q -- between the key for ability
local canslide = true
--= events

UIS.InputBegan:Connect(function(input,gameprocessed)
	if gameprocessed then return end
	if tool:IsDescendantOf(char) then
		if input.KeyCode == keybind and canslide == true then
			canslide = false
			local playAnim = char.Humanoid:LoadAnimation(slideAnim)
			playAnim:Play()
			local slide = Instance.new("BodyVelocity")
			slide.MaxForce = Vector3.new(1,0,1) * 30000
			slide.Velocity = char.HumanoidRootPart.CFrame.lookVector * 45
			slide.Parent = char.HumanoidRootPart

			for count = 1, 8 do
				wait(0.1)
				slide.Velocity*= 0.7
			end
			playAnim:Stop()
			slide:Destroy()
			wait(2.5)
			canslide = true
		end
	end
end)

Maybe you should put (IF condition) for the velocity? perhaps ;-; because I kind of don’t understand.