The issue here is that nothing is calling any of this. I don't even get what twilight is trying to do. When is this supposed to happen? For example, if I want someone to type "!newserver" into chat and be redirected to the new server, it would go like this.
hook.Add( "PlayerSay", "TTN Chat Commands", function(ply, text)
if (string.lower(text) == "!newserver" ) then --Did the player say the specific command?
ply:SendLua([[RunConsoleCommand("connect", "IP.ADRESS.GOES.HERE")]])--Replace IP.ADRESS.GOES.HERE with real IP
return "" --Keeps chat box from printing command
end
end)
Put that in lua\autorun\server and it will allow people to connect.
What way are you wanting to call this?