Need to sort through player inventory

I want to use a script to go through a player’s inventory and see which item is equipped and return nil if none are equipped. I tried tool.Equipped, but I think it’s waiting for the tool to be equipped, so what property do I use to check if the tool is equipped?

1 Like

You can check if the tool is in the character. if the tool’s parent is on a character that means it’s equipped.

2 Likes

@GoodUsername777 is right. You can use FindFirstChildWhichIsA(“Tool”). print(player:FindFirstChildWhichIsA("Tool").Name)
This will print the tool’s name. You can exchange the print to work with your own code. If you have more questions let me know!

2 Likes

Has your problem been solved? If so, please mark mine or @GoodUsername777’s solutions as, well, solution

I’m not sure yet. I still need to test it in my game, and I haven’t gotten around to doing that. I will make sure I mark on of your solutions as correct. Thank you for reminding me though!

1 Like