I understand you can do this all well and good with a ClickDetector but I want to do it with a SurfaceGui Button. All it should is print the Clickers name: It's a ServerScript inside of the SurfaceGui.
--doctorbenny2011 09/04/2016 Started 11:00GMT
local a = script.Parent
local Part = a.Parent
local MainFrame = a.MainFrame
local Close = MainFrame.Closed
local Open = MainFrame.Open
--SoundsStart
local UG = Part.UserGranted
local UD = Part.UserDenied
local SU = Part.StartUp
local SD = Part.ShutDown
local DS = Part.DenyS
local AS = Part.AcceptS
local AG = Part.AccessGranted
local AD = Part.AccessGranted
--SoundsEnd
-- THIS BIT \/\/\/\/\/\/
Close.Button.MouseButton1Down:connect(function(click)
print(click.Name)
end)

2 comments
What objects are close and button?
Closed is a Frame, Button is a TextButton inside of Closed. @iUnEarthly