Filtering Enabled Disconnects All Click Events

Like I said, they’re not really GUI elements, but rather somewhere inbetween physical in-game elements and GUI elements. I’m just calling them GUI elements since I don’t know any good term for what they actually are.

The bottom line is they’re an element that’s concerned with the user input state that only exists on the client, just like GUIs. The server can’t know whether you’re clicking on a ClickDetector without the client explicitly telling it so. This is unlike something more “physical” like a ContextAction, where the client could tell the server that it’s “using a contextaction” and the server would still be able to guess which ContextAction the client is talking about most of the time even without the cilent explicitly telling it. This is also unlike a completely physical thing like a 3d button in the world, where the server exactly knows that you stepped on the button.

Basically there’s a spectrum of physicality of user input:
← less physical - - - - - - - - - - - - - - - - - - - - - - - more physical →
GUI Button, ClickDetector, Context Action, Physical Button

[quote] Hang on there Stravant, Click Detectors are for use in physical bricks aswell. So if I want to use click detectors in bricks in my game I have to make a local script inside the starter gui, and then connect that local script to every single click detector in the place and then use remote functions to connect that local script to every single script in the place that would use a click detector.

Because that is completely impossible. [/quote]

That’s very possible and also probably not the best way of doing it.

Store all your inputs in somewhere easily referable, connect them all locally (as good logic says you should) and then do all actions that can be performed locally, locally.
For everything that needs to be dealt with serverside, use remote-events to fire on a single script containing a table with all the different actions for each input.

[quote] Hang on there Stravant, Click Detectors are for use in physical bricks aswell. So if I want to use click detectors in bricks in my game I have to make a local script inside the starter gui, and then connect that local script to every single click detector in the place and then use remote functions to connect that local script to every single script in the place that would use a click detector.

Because that is completely impossible. [/quote]

That’s very possible and also probably not the best way of doing it.

Store all your inputs in somewhere easily referable, connect them all locally (as good logic says you should) and then do all actions that can be performed locally, locally.
For everything that needs to be dealt with serverside, use remote-events to fire on a single script containing a table with all the different actions for each input.[/quote]
Just keep in mind there are something like 50 click detectors in the labs in total, and everything else there but the click detectors work with FilteringEnabled.

Because we want to code a whole system to pair 20+ Doors to 20+ Buttons. I would enjoy this to be fixed so I won’t have to waste my time coding a fix for something that cannot be used maliciously and is broken by a filteringenabled which is supposed to be for security not for breaking random stuff that has nothing to do with the exploiting problem…

Final Roblox Decision: ClickDetectors + Flitering = GG

If you have ClickDetectors and FilteringEnabled you should get to work fixing it now because it’s not going to be unblocked. On the other hand, along with the lack of unblocking, discussion on PlayerMouse::Icon is being reopened, and will possibly be implemented so that you can make your own “clickable elements” that function exactly like you want.

[quote] Final Roblox Decision: ClickDetectors + Flitering = GG

If you have ClickDetectors and FilteringEnabled you should get to work fixing it now because it’s not going to be unblocked. On the other hand, along with the lack of unblocking, discussion on PlayerMouse::Icon is being reopened, and will possibly be implemented so that you can make your own “clickable elements” that function exactly like you want. [/quote]

Ok, thanks for telling us. However, I have no clue how to rig up my scripts with anything other than a ClickDetector. Any articles you can direct me to?

If you just want a quick and dirty hack, this in a localscript in the backback, along with a “ClickDetectorBindable” event in ReplicatedStorage:

local function handleClickDetector(click)
click.MouseClick:connect(function()
game.ReplicatedStorage.ClickDetectorBindable:FireServer(click)
end)
end
local clickdetectors = findAllClickDetectors() -- just a simple recursive search of the workspace
for _, click in pairs(clickDetectors) do handleClickDetector(click) end
game.Workspace.DescendantAdded:connect(function(o)
if o:IsA('ClickDetector') then
handleClickDetector(o)
end
end)

And then on the server, instead of directly listenening on ClickDetectors:

game.ReplicatedStorage.ClickDetectorBindable.ServerEvent:connect(function(player, detector)
if detector == <the one you're interested in handling here> then
-- do your stuff
end
end)

Not very efficient, but it will work, and only requires minor changes to your server code (clickDetector.MouseClick:connect(… → becoming: ClickDetectorBindable.ServerEvent:connect(function(detector) if dectero == clickDetector), and no additional code on the client other than that one LocalScript in the backpack.

[quote] If you just want a quick and dirty hack, this in a localscript in the backback, along with a “ClickDetectorBindable” event in ReplicatedStorage:

local function handleClickDetector(click)
click.MouseClick:connect(function()
game.ReplicatedStorage.ClickDetectorBindable:FireServer(click)
end)
end
local clickdetectors = findAllClickDetectors() -- just a simple recursive search of the workspace
for _, click in pairs(clickDetectors) do handleClickDetector(click) end
game.Workspace.DescendantAdded:connect(function(o)
if o:IsA('ClickDetector') then
handleClickDetector(o)
end
end)

And then on the server, instead of directly listenening on ClickDetectors:

game.ReplicatedStorage.ClickDetectorBindable.ServerEvent:connect(function(player, detector)
if detector == <the one you're interested in handling here> then
-- do your stuff
end
end)

Not very efficient, but it will work, and only requires minor changes to your server code (clickDetector.MouseClick:connect(… → becoming: ClickDetectorBindable.ServerEvent:connect(function(detector) if dectero == clickDetector), and no additional code on the client other than that one LocalScript in the backpack. [/quote]

looks blankly at pile of code

I’m gonna need some caffeine before I tackle this.