Make sure the clickdetector script is a Server Script and is located where it can operate. (e.g. the part itself)
To parse the player, make sure something to identify the player is in the brackets. e.g. function onMouseClick(plr)
Then, you can make some sort of API using remote events.
Make sure there is another Server Script in a location of your choosing, e.g. ServerScriptService.
In that script, you should have something along the lines of this:
print("Working API Receiver")
local remote = game:GetService("ReplicatedStorage").REMOTELOCATIONHERE
function EventReceived(plr)
print(plr.Name .. " has clicked the ClickDetector!")
end
remote.Event:Connect(EventReceived)
Remember, when firing the event make sure to parse the player or the api receiver will error!