Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you check if a player is holding a tool?

Asked by 4 years ago

I know that when a player holds a tool, it is parented by the player's character. I am making a keycard system to make sure that once a player is holding a keycard, they can not pick up any more keycards. All the keycards have different names, so I cant use wait for child. Is there a way to check a players model for a tool without using wait for child?

1
You could make a list of the keycard names. Then compare it with the children of the players backpacks. If there’s an object that matches your list of names then you don’t pick up tool. I don’t remember how to not pick up tooos though SethHeinzman 284 — 4y
0
I guess you could have fake tools that are actually parts that look like the tool. Have a script inside that detects if the player touched it. Then you would do what I said above and see if they have keycard. If they don’t then you put the tool that corresponds with the part inside the players backpack. SethHeinzman 284 — 4y
0
The best way to confirm an active tool, is to look for it in the Character. Ziffixture 6913 — 4y

Answer this question