Hi everyone, I was building a GUI System and I was wondering that is there a function that lets you reference a player when the player clicks on a TextButton?
script.Parent.MouseButton1Click:Connect(function(click)
local obj = script.Parent.Parent.Parent.Database
local newobj = Instance.new("StringValue", obj)
newobj.Name = click.Name --(everything works until here, where "click" is not valid due to the event not having a valid variable)
end)
Looking forward to your responses!

2 comments
This is actually a surfaceGui, and not a ScreenGui, if it was a ScreenGui, I'd knew what to do.
http://wiki.roblox.com/index.php?title=API:Class/SurfaceGui , ;)