Unable to Tool:Activate on left hand tool

I’m working on a dual-wielding NPC and the tool in the left hand does not activate or deactivate when I call Tool:Activate or Tool:Deactivate on it. It works fine for the right hand tool though, but not the left. I made sure the left hand weld is correct.

image

The tool does show correctly on the NPC, so I know it’s correct. Here’s the NPC script:

local bossModel = script.Parent
local bossHuman = bossModel:FindFirstChild("Humanoid")
local bossRoot = bossModel:FindFirstChild("HumanoidRootPart")

local toolLeft = bossModel:FindFirstChild("WristGauntlet")
local handLeft = bossModel:FindFirstChild("LeftHand")
local toolRight = bossModel:FindFirstChild("WristBlades")
local handRight = bossModel:FindFirstChild("RightHand")


for _, item in pairs(script.Parent.RightHand:GetChildren()) do
	if item.ClassName == "Weld" then
		if item.Part0 == toolLeft.Handle or
			item.Part1 == toolLeft.Handle then
			-- Move the weld
			item.Part0 = handLeft
			item.Part1 = toolLeft.Handle
			item.Name = "LeftGrip"
			item.Parent = handLeft
		end
	end
end

task.wait(1)

local diedConnect = bossHuman.Died:Connect(function()
	print("Left Tool")
	toolLeft:Activate()
end)

Here’s the tool script. It’s the same for both left/right.


local toolInstance = script.Parent



toolInstance.Activated:Connect(function()
	print(toolInstance.Name, "Activated")
end)

toolInstance.Deactivated:Connect(function()
	print(toolInstance.Name, "Deactivated")
end)

toolInstance.Equipped:Connect(function()
	print(toolInstance.Name, "Equipped")
end)

toolInstance.Unequipped:Connect(function()
	print(toolInstance.Name, "Unequipped")
end)

The printouts happen for the right tool, but not the left. I have even tried manually typing the activate command on the server’s command line and I’m getting the same result. It works (prints) on the right weapon, but not the left. It’s also interesting to note that when the NPC spawns, the equipped message shows up for the right weapon, but not the left.

Does anyone have any ideas on how to get this to work?

I fixed it. I restarted Roblox Studio and it started working. Must have been some weird glitch or something.