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: Clickdetector with a tool?

Previous Thread :: Next Thread 
windbeach is not online. windbeach
Joined: 11 Jul 2013
Total Posts: 293
11 Dec 2016 09:19 AM
So I have a box with a click detector, it fires whenever I click while not holding a tool, but doesn't when I click while holding a tool.

Any way I can detect clicks on a part while holding tools?


Report Abuse
windbeach is not online. windbeach
Joined: 11 Jul 2013
Total Posts: 293
11 Dec 2016 10:48 AM
b/


Report Abuse
Funkylegoman is not online. Funkylegoman
Joined: 18 Sep 2010
Total Posts: 1385
11 Dec 2016 10:52 AM
Try adding a script or local script (not sure if there'd be a difference in this case) in the tool and put this in the script:

script.Parent.Selected:connect(function(mouse)
target = mouse.Target
if target then
if target == The location of your part then
mouse.Button1Down:connect(function()
-- code
end
end
end)
Report Abuse
Funkylegoman is not online. Funkylegoman
Joined: 18 Sep 2010
Total Posts: 1385
11 Dec 2016 10:53 AM
if target.Parent == The location of your part then*

Forgot a crucial part.
Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
11 Dec 2016 10:56 AM
Make a custom clickDetector
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