Not allowing player to unequip tool

Hello, would I have to create my own backpack GUI to not allow the player to unequip their tool until after their animation is ended?

When a player equips a tool they get placed in an equipping animation, I’m having trouble finding ways to not allow the player to interact with their tool until the animation’s .Ended event fires.

I wish to do this without disabling the gui, any help will be appreciated! Thank you for your time.

See if this helps: How do I prevent the player from unequipping a tool for a time?

I tried this posts method with the debounce and the humanoid:EquipTool(tool), but it bugs out as the tool doesn’t get unequipped, but it gets equipped again and forces the players arm to go up even if they’re in an animation

If I’m understanding the post right, you could keep track of when the tool is fully equipped in a variable, and set the variable to “true” or something when the animation ends. Then you can just not let any other code run unless this variable is true. You’ll probably want to do a check after the animation ends just to make sure the tool is still equipped (incase they unequip it during the animation), then set your variable to true.

This won’t stop them from unequipping the tool, but you’ll at least prevent them from doing anything else with it until they’ve waited for the equip animation to end.

Yeah I understand, it’s just unfortunate that tools don’t have a magical “CanEquip” value to check off. I might do this, but is it safe to say if I want the player to not be able to interact with the hotbar at all during an animation I would have to make my own backpack gui script?

Probably. Based on two posts I’ve seen recently it looks like it’s a pain to deal with that kind of stuff, but yeah overall making your own backpack system would have way more benefits.

1 Like

Yeah that’s true, I think I would’ve eventually needed to make a custom backpack system anyway so I might as well get on that. Thanks for the help!

No problem and good luck with your project!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.