Did you have the client that you put the script on, disconnect from the network, then reconnect? If not, then the ON CONNECT event won't have triggered