Dash Attack script help

so I tried to make a dash attack script but it wouldn’t attack the player/dummy’s damage, the speed is working fine

game.ReplicatedStorage.DashEvent.OnServerEvent:Connect(function(player)
if player.Character then
if player.Character:FindFirstChild(“HumanoidRootPart”) then
local dashDir = player.Character:FindFirstChild(“HumanoidRootPart”).CFrame.LookVector
local originalVelocity = player.Character:FindFirstChild(“HumanoidRootPart”).Velocity
local isDashing= true
player.Character:FindFirstChild(“Humanoid”)

		originalVelocity = dashDir *250			
		workspace["Doppio Strong Punch HIT Sound"]:Play()
		
		player.Character:FindFirstChild("HumanoidRootPart").Touched:Connect(function(hit)
			if isDashing then
				if game.Players:GetPlayerFromCharacter(hit.Parent) and game.Players:GetPlayerFromCharacter(hit.Parent) ~= player then
					if hit.Parent:FindFirstChild("Humanoid") then
						hit.Parent:FindFirstChild("Humanoid"):TakeDamage(10)
					end
				end
			end
			
		end)
		task.delay(.2, function()
			player.Character:FindFirstChild("HumanoidRootPart").Velocity = originalVelocity
			isDashing = false
		end)
		
		
		


	end
end

end)

3 Likes