Getting payers to reconnect to another server ON connect

[lua]*function GM:PlayerConnect()
for k,v in pairs(player.GetAll()) do
v:ConCommand(“connect ip”)

Help me debug please, I believe there is an error on line one… If there is a better way to do this please, by all means, let me know.

Can’t find any way of running the command during connection without receiving files, the command is blocked from server -> client.

For one there is a * before function…


What the hell is with the astrict before the function name>

Use Gatekeeper.


After removing the asterisk, change the hook to PlayerInitialSpawn or PlayerSpawn, because your code will only work if a player has spawned and another player connects.

Thanks overv, I was aware of the asterisk after I posted… But that was just accidentally added when I was doing the [lua] tags.