generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Checking if you are select a tool

Previous Thread :: Next Thread 
ClintBlocker is not online. ClintBlocker
Joined: 27 Jun 2017
Total Posts: 183
04 Oct 2017 11:16 AM
How do I use a script to check if a player is selecting a tool, for example:

if nearest player is selecting tool1 then
blah blah blah
end

Btw when I say "selecting" I mean like when a player touches the tool in inventory before using it
Report Abuse
ClintBlocker is not online. ClintBlocker
Joined: 27 Jun 2017
Total Posts: 183
04 Oct 2017 11:19 AM
Bump em up...
Report Abuse
soutenu is online. soutenu
Joined: 09 Dec 2011
Total Posts: 1021
04 Oct 2017 11:24 AM
game:GetService'Players'.LocalPlayer.CharacterAdded:Connect(function(char)
char.ChildAdded:Connect(function(child)
if(child.ClassName=='Tool')then
print(child.Name..' was equipped!');
end;
end);
char.ChildRemoved:Connect(function(child)
if(child.ClassName=='Tool')then
print(child.Name..' was unequipped!');
end;
end);
end);
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image