Found it - in the server script netLobby is destroyed, whereas in the client script it is only disabled and therefore this function didn't run.