Hello, so my friend made it to where you can click on a tool to pick it up, which I like, but I want the players who play the game to only be able to hold one tool at a time. I was wondering if there was a way to make it where if a player is already holding a tool, and they click on a new tool, the tool they are currently holding is placed where the new tool was, and the player is now holding the new tool. Thanks in advance!
Since this isn't a code request site I'll tell you how you can write the code yourself. I'd suggest making a script in ServerScriptService. In the script, make an event for when a player joins, then make an event to detect when a child is added to the player's character. Check if the object is a tool, and if it is, then check the player for another tool. If the player has another tool, simply set its parent to the workspace and it will be dropped. I think that should work fine. Try and write the code and if it's not working, then, you can come and ask for help with your code.
Closed as Not Constructive by Lakodex, JesseSong, imKirda, Leamir, jediplocoon, matiss112233, and TaxesArentAwesome
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?