✓ Accepted answer
As the wiki states: "If you have FilteringEnabled set to 'true', this will not fire on the server and only on the client. To avoid this, connect the event on the client and use a RemoteEvent to inform the server about it being clicked."
You can find this source here: http://wiki.roblox.com/index.php?title=API:Class/ClickDetector/MouseClick
Solution
Like every other change that has to be made when FilteringEnabled interferes with something, remotes are the way to go, and that's how you'll solve this.
Remotes
A remote (be it a remote event, remote function, bindable event, ect) are used to passing information between their corresponding sides of the network (except for bindable remotes, which are only used to pass information between the same machine).
If you don't know how remotes work, I HIGHLY suggest going here, reading all about them, and practicing them: http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial
Example
Once you've done that, you'll probably be able to understand this example a little better, implementing the use of a remote event defined with the "Remote" variable:
local Remote = game:GetService("ReplicatedStorage"):WaitForChild("ClickEvent")
local Clicker = workspace:WaitForChild("Part"):WaitForChild("ClickDetector")
Clicker.MouseClick:connect(function(plr)
Remote:FireServer()
end)
Hope this helped. Let me know if you have any questions.
1 comment
Hi FRIEND :D It's me, Acheo.