Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Click Detector disappears?

Whenever you equip a tool in ROBLOX, ClickDetectors suddenly don't register anymore (until you un-equip the tool again). So my question is, how do I get it so that ClickDetectors will work when a tool is equipped?

1 answer

✓ Accepted answer

This functionality isn't available.

Either accomplish what you are trying to do without a tool (and use PlayerMouse for everything, perhaps?), or implement the clicking as a part of the tool.


Although I'm not certain, you may also be able to use the PlayerMouse while tools are equipped. I am not so sure about that, however. If you can, then you could implement all ClickDetector things through that instead.

5 comments

0

This may not be able to be answered in a comment (and I know it's been asked before but I can't find it from searching this site's previous posts), but since I can't do what I originally planned, how do I make a function run when something is clicked without a ClickDetector?

0

Using the Mouse events (Button1Down). Mouse objects from the GetMouse or from Equipped or Selected (search on Wiki)

0

Yes but I mean when I click on a certain brick. How would it know when the mouse is in a certain spot?

0

Look on the Wiki. Mouse objects have a Target property which is the object hovering over and a Hit property which is the CFrame of the position they are hovering at.

0

Oh I'm an idiot I read over those properties and didn't even see that -_-. Thanks for putting up with me. But how do I target the mouse without using it in a function? What I mean is, what ancestry goes before it?

This discussion is preserved as it was. New answers, comments, and votes are closed.