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

Click Detector disappears?

Asked by
emite1000 335 Moderation Voter
10 years ago

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

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

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.

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? emite1000 335 — 10y
0
Using the Mouse events (Button1Down). Mouse objects from the `GetMouse` or from `Equipped` or `Selected` (search on Wiki) BlueTaslem 18071 — 10y
0
Yes but I mean when I click on a certain brick. How would it know when the mouse is in a certain spot? emite1000 335 — 10y
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. BlueTaslem 18071 — 10y
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? emite1000 335 — 10y
Ad

Answer this question