I am working on a script where a button will fire an event and a script in serverscriptservice will run a function. I need the script to clone a tool in the player that fired the events backpack.
✓ ANSWER ACCEPTED
How do I get the player that fires an event?
1 answer
✓ Accepted answer
Super easy, when connecting a function to that remote event, it's the first parameter (actually gave me quite a bit of trouble when I first started using them. You can access it like this:
RemoteEvent.OnServerEvent:Connect(function(player) end) Now of course you don't put any parentheses if your function is instantiated before connecting, so put that parameter in the function that is used.
1 comment
0
You helped me so much thank you
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
It's automatically the first parameter
LMFAO ^