Tool Equipped/Unequipped Events Not Triggering Consistently

Problem Description

I’m experiencing an issue with Tool Equipped and Unequipped events not firing consistently in my game. The events work fine initially, but after certain interactions (specifically when using a ProximityPrompt with the “G” key) when I’m buying from the shop the Sword holder placement system placeholder is working perfectly fine which is not the case with the ProximityPrompt, the events stop triggering altogether.

Expected Behavior

  • When a player equips a tool, the Equipped event should fire
  • When a player unequips a tool, the Unequipped event should fire
  • This should happen every time, regardless of how the tool was obtained

Current Behavior

  • Events work correctly on first tool usage
  • After using ProximityPrompt with “G” key, subsequent tool equips/unequips don’t trigger the events
  • The tool appears in the player’s hand visually, but the events are silent

Code Structure

ProximityPrompt Handler (Server)

lua

ProximityPrompt.Triggered:Connect(function(playerWhoTriggered)
    if Owner.Value == playerWhoTriggered then
        local RackService = cachedModules.Cache.RackService
        local InventoryService = cachedModules.Cache.InventoryService
        local DataService = cachedModules.Cache.DataService
        local cosmeticService = cachedModules.Cache.CosmeticShopService
        local playerData = DataService.getData(playerWhoTriggered)
        local playerPlotOwned = playerWhoTriggered:FindFirstChild("PlotOwned").Value
        local IsForgingSword = playerPlotOwned:GetAttribute("IsForgingSword")
        
        if ProximityPrompt.KeyboardKeyCode.Name == "G" and not IsForgingSword and playerData.CurHolder > 1 then
            if CurSword == 0 then
                local Name = Object.Name
                cosmeticService.giveCosmetic(playerWhoTriggered, Name, 1)
                Object:Destroy()
            end
        else
            TriggerSound:FireClient(playerWhoTriggered, "Error")
        end
    end
end)

Tool Creation & Event Binding (Server)

local toolClone = isHolder:Clone()

toolClone.Parent = player.Character
toolClone.Name = upgradeDataModule[toolName].Name
toolClone:SetAttribute("Name", upgradeDataModule[toolName].Name)

print("TOOL CLONE IS : ", toolClone.Name)
print("TOOL INSTANCE IS A TOOL IS : ", toolClone:IsA("Tool"))

toolClone.Equipped:Connect(function()	
    print("EQUIPPED HOLDER")
    
    for _, part in ipairs(toolClone:GetDescendants()) do
        if part:IsA("BasePart") then
            part.Transparency = 1
        end
    end
    
    if toolClone.Name:find("Crate") then
        print("NEXT ID CRATE OF PLAYER SHOULD BE : ", player:WaitForChild("CrateCount").Value + 1)
        ActivatePlacement:FireClient(player, toolName, true, true, player:WaitForChild("CrateCount").Value + 1)
    elseif toolClone.Name:find("Sword holder") then
        print("NEXT ID HOLDER OF PLAYER SHOULD BE : ", player:WaitForChild("HolderCount").Value + 1)
        ActivatePlacement:FireClient(player, toolName, true, true, player:WaitForChild("HolderCount").Value + 1)
    end
end)

toolClone.Unequipped:Connect(function()
    print("UNEQUIPPED HOLDER")
    if toolClone.Name:find("Crate") then
        print("NEXT ID CRATE OF PLAYER SHOULD BE : ", player:WaitForChild("CrateCount").Value + 1)
        ActivatePlacement:FireClient(player, toolName, false, true, player:WaitForChild("CrateCount").Value + 1)
    elseif toolClone.Name:find("Sword holder") then
        print("NEXT ID HOLDER OF PLAYER SHOULD BE : ", player:WaitForChild("HolderCount").Value + 1)
        ActivatePlacement:FireClient(player, toolName, false, true, player:WaitForChild("HolderCount").Value + 1)
    end					
end)

Console Output Example

I will include a screenshot of my console showing that the “EQUIPPED HOLDER” and “UNEQUIPPED HOLDER” prints are missing after using the ProximityPrompt

What I’ve Tried

  1. Verified that toolClone:IsA("Tool") returns true
  2. Added debug prints to confirm tool creation
  3. Checked that the tool is properly parented to player.Character
  4. Confirmed the issue only occurs after using the “G” key ProximityPrompt

Questions

  1. Could the Object:Destroy() call in the ProximityPrompt be affecting subsequent tool instances?
  2. Are there any known issues with Tool events after certain server operations?
  3. Should I be connecting these events differently for server-created tools?
  4. Is there a way to “refresh” or re-establish event connections?

Environment

  • This is happening on the server side
  • Tools are created via Clone() from ServerStorage
  • Issue is reproducible 100% of the time after using the ProximityPrompt

Any help or insights would be greatly appreciated! The tools appear and function visually, but the critical Equipped/Unequipped events are essential for my game’s placement system.

Uh yeah you don’t do that, you parent it to the player’s backpack, you can equip/unequip a tool using the player’s humanoid

This is probably your main problem, I didn’t have time to look over the full code, just saw this was a thing.

Server-Created tools should be the only type of tools, tools “created” on the client on exist for the client, not the sever, nor other clients

1 Like

So your problem isn’t the events not firing, it’s the if statement not passing.

if toolClone.Name:find("Crate") then

This could be the name is not written properly. So the solution I prepose is that each crate has a attribute called “crate” which in the if statement it can be…

if toolClone:GetAttribute("Crate") then
-- rest of code

Sorry I’m back let’s see when I try the solutions proposed

I actually tried putting it in the backpack and sadly I still didn’t have the event Equipped or Unequipped not working

Why don’t I have this line then in the console below when it should print EQUIPPED HOLDER

Here’s what it does when I press with G on the Rack

No it’s not there the problem I can confirm

I’ve tried to create local function for Equipped and Unequipped Event sadly this doesn’t work either

local function Equip()
					print("EQUIPPED HOLDER")

					for _, part in ipairs(toolClone:GetDescendants()) do
						if part:IsA("BasePart") then
							part.Transparency = 1
						end
					end

					if toolClone.Name:find("Crate") then
						ActivatePlacement:FireClient(player, toolName, true, true, player:WaitForChild("CrateCount").Value + 1)

					elseif toolClone.Name:find("Sword holder") then
						ActivatePlacement:FireClient(player, toolName, true, true, player:WaitForChild("HolderCount").Value + 1)
					end
				end
				
				local function Unequip()
					if toolClone.Name:find("Crate") then
						print("NEXT ID CRATE OF PLAYER SHOULD BE : ", player:WaitForChild("CrateCount").Value + 1)

						ActivatePlacement:FireClient(player, toolName, false, true, player:WaitForChild("CrateCount").Value + 1)

					elseif toolClone.Name:find("Sword holder") then
						print("NEXT ID HOLDER OF PLAYER SHOULD BE : ", player:WaitForChild("HolderCount").Value + 1)

						ActivatePlacement:FireClient(player, toolName, false, true, player:WaitForChild("HolderCount").Value + 1)
					end
				end
				
				toolClone.Equipped:Connect(Equip)
				
				toolClone.Unequipped:Connect(Unequip)