I have a custom equip system, as I’m not using the default backpack. However, destroying the tool results in the unequipped function inside it never firing?
--// Equip item
local function Equip(player, equipping, item)
local Character = player.Character
if not Character then return end
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
if not Humanoid then return end
local Tool = Character:FindFirstChildWhichIsA("Tool")
if Tool then -- Clear any previous tools
Tool:Destroy()
end
if not equipping then return end
local StarterGear = player.StarterGear
if not StarterGear then return end
local ToolItem = StarterGear:FindFirstChild(item)
if not ToolItem then return end
local Clone = ToolItem:Clone()
Clone.Parent = Character
end
EquipItem.OnServerEvent:Connect(Equip)
Tool script
local Tool = script.Parent
Tool.Equipped:Connect(function()
print(1)
end)
Tool.Unequipped:Connect(function()
print(2)
end)