ChildRemoved event won't trigger

I have been trying for hours to solve this script problem, the ChildRemoved event won’t trigger but ChildAdded event trigger normally, I tried to use the separate ChildRemoved script and it works, but I would like to know why it is not working together with ChildAdded.

Here’s the script…

local CLASS = "Tool"
local C_ = "<BP_TOOL> "

---------------------------------

local function InvAdd(item,slot)
 -- script
end

local function InvRem(item)
 -- script
end

---------------------------------

P_BP.ChildRemoved:Connect(function(_r)
	if _r:IsA(CLASS) then
		print(C_.. _r.Name.. " is a tool and has been removed from the backpack")
		if CHAR:FindFirstChild(_r.Name) then
			print(C_.. _r.Name.." in use")
		else
			print(C_.. _r.Name.." removed from backpack")
			InvRem(_r)
		end
	else 
		print(C_.. _r.Name.. " isn't a tool and has been removed from backpack")
	end
end)

P_BP.ChildAdded:Connect(function(_a)
	if _a:IsA(CLASS) then
		print(C_.. _a.Name.. " is a tool and has been added to the backpack")
		local Find = false
		for i,v in pairs(ToolSlots) do
			if v.Info.TL_Tool.Text == "" then
				if not Find then
					Find = true
					InvAdd(_a,i)
				end
			end
		end
	else
		print(C_.. _a.Name.. " isn't a tool but has been added backpack")
	end
end)

Thanks for any help!

What kind of stuff do you get in the output when a child is added and removed? The code you provided should work. If it works in a different script, that probably means the problem is from code outside the Connect call. Looking at your code, it also probably happens in a part of the code above the given segment.

I’d also avoid using an underscore in front of variables. At least in most languages I know, that’s saved for internal variables (not sure about Lua).