Unequipped callback for tools

tool.OnUnequipped = function()
-- Do stuff before unequipping
-- Play sheath/holster animation
end

It’d be nice to have a callback for tool unequipping, so we can do things like play holster animations before the tool is fully unequipped.

9 Likes

I wonder if this would cause conflicts with them trying to select another tool before the unequip finished? Might be a way to make it so you can’t equip another tool until that’s done.

I kinda like this idea. Support.

Lack of support for this is part of why I don’t use tools. Depending on how the API for tools ends up in the event this is implemented, I may start using them. The main things I’d need would be:

  • Ability to animate gripWeld – should be a Motor6D rather than a Weld
  • Ability to cancel equip/unequip at any time
  • Ability to prevent users from changing what they have equipped / unequipping it
  • Ability to prevent other tools from being equipped until the current one has “finished” unequipping
  • Ability to prevent changing equipment until current tool has “finished” equipping
1 Like

This, my ‘tools’ don’t even have the tool model inside of them, I call an event to weld the tool model with a Motor6D, allowing me to animate the tool with the animations plugin.