Help with making a part shake when I hit it with a weapon

I originally wrote this script to make a part shake whenever I touch it. The script works fine as it is. I’m just having trouble with getting the part to shake only after i hit it with a weapon. As of now from what i tested it shakes both after i hit it and touch it. The script is below:

local part = script.Parent

part.Touched:Connect(function(BoneAxe)
	script.Parent.Orientation = Vector3.new(math.random(), math.random(), math.random())
end)
local part = script.Parent

local function rand()
	return math.random(-5, 5)
end

part.Touched:Connect(function(hit)
	if hit.Name == "Handle" then --make sure it's the tool hitting
		script.Parent.Orientation += Vector3.new(rand(), rand(), rand())
	end
end)