Here’s an explanation by Stravant:
[quote] 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]
[Source thread]
If you do not want to completely rewrite all of your current button code, which was the case when I updated Deathrun to run on FilteringEnabled, you can make them work as expected with this code:
[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]
[Source thread]