Dash Tool wont Work

Hey, I am making a click to dash tool but the dash doesn’t work and I am getting no errors, does anyone know why? Here is my script,

local UIS = game:GetService("UserInputService")

local Camera = workspace.CurrentCamera

local Blocking = false

local Tool = script.Parent

local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()
while Char.Parent == nil do
	Char.AncestryChanged:wait()
end

local HumRP = Char:WaitForChild("HumanoidRootPart")
local Hum = Char:WaitForChild("Humanoid")

local val = false

local DashDebounce = false
local DashingDebounce = false

local isHolding = false

Hum.StateChanged:Connect(function(oldState, newState)
	if newState == Enum.HumanoidStateType.Jumping then
		val = true
	elseif newState == Enum.HumanoidStateType.Landed then
		val = false
	end
end)
	
Tool.Activated:Connect(function()
	if val == true then return end

	if Char:FindFirstChild("noJump") then return end
			if DashDebounce == false then
				
				DashDebounce = true
				delay(2.5,function()
					DashDebounce = false
				end)
					DashingDebounce = true
					
					delay(0.25,function()
						DashingDebounce = false
					end)
					
					repeat
						
						HumRP.Velocity = HumRP.CFrame.lookVector * 130
						wait(0.1)
					until DashingDebounce == false
		end
end)

Any help would mean so much, thank you.

set RequiresHandle to false in the tool properties

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.