Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't TeleportToPrivateServer doing anything?

Asked by 9 years ago

This code runs on the server side, as a RemoteEvent. The event is passed in a table (which is the argument job), which really isn't relevant. What IS relevant is that this code should send the player to a private server when run, but it does nothing. There is no error output, or any output of any kind, for that matter. By putting print statements on every line, I found that no portion of the code hangs forever. 356733612 points to a valid place ID.

game.ReplicatedStorage.API.TeleportPlayer.OnServerInvoke = function(player,  job)
    job.server = game:GetService("TeleportService"):ReserveServer(356733612)
    game:GetService("TeleportService"):TeleportToPrivateServer(356733612, job.server, {player}, nil, job)
end

So, what's going wrong?

Answer this question