I have a part in the workspace and then a surface gui in that part, and in that surface gui a frame, and in that frame a button, I have this script going so far but dont know how to get the player using this server sided script?
script.Parent.MouseButton1Click:connect(function()
local player = game.Players.LocalPlayer

2 comments
Wait, you need it so when you press the button it teleport s a player to you?
No, I need it so when you press the button, it gives the player a hat, I have that script sorted, I just need to get the player from the click