I have a part in workspace that should get to a script in ServerScriptService. The part has a ClickDetector and a Script saying:
script.Parent.ClickDetector.MouseClick:connect(function(Player)
game.ReplicatedStorage:WaitForChild("BindableFunction"):InvokeServer(script.Parent) --Here
print('Click sent')
end)
The script in ServerScriptService says:
local Listener = game.ReplicatedStorage.BindableFunction
function Listener.OnInvoke(Player, Brick)
print('Click Received')
wait(0.3)
local t = Player.leaderstats.Tokens --Here
However, I get the output of 'leaderstats' is not a valid member of Part in the marked places. Both places have the same output.
How would I make the script get to the player instead of the part? And before I get any comments like 'just switch them around'. That doesn't work.

1 comment
Thanks for marking mine as your answer, I'm glad I could help!