I am encountering this behavior where if a player is given/has a tool from a seat or anything and that tool is removed from their inventory while they have it selected without them first deselecting it; their cursor does not revert to default and they can’t interact with other clickable things.
How can I stop this behavior from happening? Is there a method to reset the players cursor when they have a tool force-removed from their backpack?
I have not been able to find any other posts that describe fixing my problem; at least not in the way that I’m describing it. I hope any solutions to this post can help other people easily find it as well.
As you can see in this video I’m able to interact with the object and click it, but the moment that I get in the vehicle and then I select the tool but jump out and the tool is removed from my backpack that I can no longer click anything.
Like I mentioned before, I’m experiencing the behavior of when you have a tool equipped and then a script or whatever forcefully removes it from you; your cursor breaks and you can’t click other things unless you get the same tool or another tool and reselect and deselect to reset your cursor so you can click things again when you don’t have a tool.
Here’s how I fixed it; and I actually ran into two problems.
First problem, Cursor breaking from the tool being removed:
– I fixed this issue by using Humanoid: UnequipTools(), calling it on my character before removing their tool. Works great.
Second problem, UnequipTools() executing but NOT working:
–The reason this was happening for me was because I was using deprecated “tools”, aka the Hopperbin(s). So what I did is replaced my Hopperbin with a tool, switched events from Selected:Connect and Deselected:Connect to Tool’s Equiped and Unequipped; and ALSO don’t forget to uncheck the tool’s “Require handle” if your tool doesn’t have a handle or these events won’t fire.
Also im currently responding fast because im trying to get promoted and im at 9 hours of read time i meet everything else i just need 7 more read hours.