Hello all,

I was just wondering how to get the player who clicked a button on a surface GUI from a server script? I know that you can use a Local script somewhere else to handle the button but I don't want that, I want the server script in the button to fire a Remote Event once it's clicked, but I don't know how to get the client from it.

Any help would be appreciated! (P.S I don't want the PlayerAdded function, that didn't work in this situation)

3 comments

0

server scripts cannot access LocalPlayer, your best shot is to use GetPlayerFromCharacter() if you do not want to use PlayerAdded

0

Show us your script first then we will fix it.

0

This does not require the showing of a code block.