Gui activated from tool will not close without player actively unequipping tool

1. What do you want to achieve? Keep it simple and clear!
I have made a custom toolbar, where if the player press a button for a gear, they equip it, press again the tool gets destroyed from the inventory/backpack. I have made a tool that activates a gui on the screen, that i want to disappear when the player doesn’t hold the tool.

2. What is the issue? Include screenshots / videos if possible!
The problem is that by “unequipping” the tool, they dont actually fire the tool.Unequipped event, and i have tried other ways too but the gui will not disappear from the screen unless the player actively unequips the gear (wich will not be possible since i hide the roblox toolbar from players), die or leave. Here is my current solution, using a stringvalue that displays what tool is currently equipped, it still does not hide the gui.

3. What solutions have you tried so far? Did you look for solutions on the Creator Hub?
I have tried using gui.Enabled = false, i’ve also tried checking if the player has any tools equipped in other ways, i’ve also tried forcing the tool.Unequipped event in other ways, nothing works.

Perhaps try listening to the Characters ChildAdded and ChildRemoved event.

1 Like