when you equip a tool, the tool gets parented to the player's character.
so i can't use ChildRemoved
event on the backpack because it also fires the function when the tool is equipped.
i have tried checking if the tool is parented into the player's character when the childremoved event is fired then disconnecting the function after that. doesn't work
is there any way?
Try using the AncestryChanged event
local Backpack = game:GetService("Players").LocalPlayer:WaitForChild("Backpack") local Tool = Backpack:WaitForChild("Tool") Tool.AncestryChanged:Connect(function(Tool, Parent) if not Parent then print("Tool is being removed!") end end)