Detect when a tool is dropped on client side

How do I detect if a tool is dropped on the client side? tool.AncestryChanged or player.Character.ChildRemoved work on the server, but do not on the client because the script gets removed before the event can be called. If there was a way to detect this right when it is about to happen/before it happens, it would work fine, but I couldn’t seem to find a method for that.

1 Like

You could make a local scrip in the PlayerCharacterScript that would check when a tool es equiped, and connect an event whent the said tool get dropped

I will try this, but is there a way to do it without having to create scripts outside of the tool itself?

the tool is not deleted when you unequip it… but i think it’s deleted from your character and inventory when you drop it… so i’m afraid not.

Alright, I’ll just create a script to add a script to PlayerCharacterScripts and then remove it, thanks!

1 Like

Keep us informed if you found the solution, otherwise If you need anything else, i will try to help !

Another option would be to use a Script with RunContext set to Client. This will run code like a LocalScript (on the client), however it will run from any container unlike the requirements of a LocalScript.

If you use this method, you might need to adjust your Tool code slightly to account for the differences in when/where it runs.

  • If your Tool is initially parented to StarterPack, you’ll get a warning because code will execute in the “template” Tool (a clone of this Tool will be parented to the local player’s Backpack every time a Character is spawned).
  • If your Tool is initially parented to ReplicatedStorage, the code will also run here. To avoid this case, start with the Script’s Enabled property set to false, and when some other code in your game clones the Tool into a Player’s Backpack, change Enabled to true.