try this:
Team_Selection_1 = {}
function onPlayerResourceStart( )
Team_Selection_1[1] = guiCreateButton(326,534,196,88,"Attack",false)
guiSetFont(Team_Selection_1[1],"sa-header")
Team_Selection_1[2] = guiCreateButton(199,90,5,5,"",false,Team_Selection_1[1])
Team_Selection_1[3] = guiCreateButton(562,534,196,88,"Defence",false)
guiSetFont(Team_Selection_1[3],"sa-header")
Team_Selection_1[4] = guiCreateButton(199,90,5,5,"",false,Team_Selection_1[3])
guiSetVisible( Team_Selection_1, true )
showCursor(true)
end
function onPlayerClickGUI(button)
if (button == "left") then
ouputChatBox( "You clicked Attack" )
end
end
addEventHandler ( "onClientGUIClick", Team_Selection_1[1], onPlayerClickGUI, false )
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), onPlayerResourceStart )
You forgot to add the false at the end of onClientGUIClick.