Error: "Tool:Activate() called from script when tool is not equipped. Tool will not be activated"

I don’t really now why im getting this error because i force equip the tool, but when i come too closer to the target im getting this error.

This is a video:

And this is the script:

if not game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool") then
	local Tool = game.Players.LocalPlayer.Backpack:FindFirstChildOfClass("Tool")
	hum:EquipTool(Tool)
	
	hum:MoveTo(Mesh - CFrame.new(HumanoidRootPart.Position, Mesh).LookVector * 3)
	
	hum.MoveToFinished:Connect(function(P_)
		
		if Tool.Parent == plr.Character then
			Tool:Activate()	
		else
			while Tool.Parent == plr.Character do
				Tool.Parent = plr.Character
				wait(.2)
			end
			Tool:Activate()
		end
		
		Tool.blade.Touched:Connect(function(DM)
			if DM.Parent.Parent == game.Workspace.Folder and DM.Parent.CurrentHealth ~= 0 then
				while DM.Parent.Parent == game.Workspace.Folder and DM.Parent.CurrentHealth ~= 0 do
					Tool:Activate()
					wait(.2)
				end
			else
				hum:UnequipTools()
			end
		end)
	end)
end

I hope anyone can help me.

1 Like

I’m having the same problem. Did you find out what it was?

1 Like

Hi, I dont know but I have a idea. when moveToFinished connect function, Equip Tool Again

for example;

hum.MoveToFinished:Connect(function(P_)
hum:EquipTool(Tool)
if Tool.Parent == plr.Character then
			Tool:Activate()	
		else
			while Tool.Parent == plr.Character do
				Tool.Parent = plr.Character
				wait(.2)
			end
			Tool:Activate()
		end
end)