I've been struggling with this problem for a few days now, and I'm wondering if the problem is from me not having scripts/remote events in the right places. While in studio, my scripts are detecting my clicks and doing exactly what they are supposed to after the player clicks. When I play as a user on the Roblox servers, nothing works at all.
Anyway, I scripted my own axe to deal damage to trees after my remote event, "PlayerClicked" (located in Replicated Storage) is fired.
Here is the bit where it gets handled in the axe script:
local clickEvent = game.ReplicatedStorage.RemoteEvents.PlayerClicked
-- RemoteEvents is a folder
clickEvent.OnServerEvent:Connect(function()
Clicked() -- Function that deals damage, etc.
end)
And here is the script that detects the click and fires the remote event:
local Player = game.Players.LocalPlayer --get the local player
local Mouse = Player:GetMouse() --get the mouse
Mouse.Button1Down:connect(function()
game.ReplicatedStorage.RemoteEvents.PlayerClicked:FireServer()
end)
The script detecting the clicks is a local script located in StarterGui, and the axe script is a server script located on the axe tool.
I can't figure this out for the life if me. If someone could point me in the right direction, I would be very grateful!
After some debugging, I've narrowed the problem down a little. The listener for user input in the local script is working perfectly fine, It might not be firing the RemoteEvent though and that still leaves the server script as well. I still have no idea where the error is occurring.
As a side note, disabling filtering has no effect.

3 comments
LocalPlayer is nil on the server.
Facepalm, that's why we use the argument game.Players.LocalPlayer when firing the remoteevent. That's also why we use the argument "Player" in the ServerScript.
Not sure what exactly you are trying to solve here.... but passing through the player as a parameter wouldn't change anything. I don't need the player reference anymore after the click has been detected and the server script fired.