Basically i'm making a system that will teleport all the players in a lobby to a private server though i'm getting this error with a Normal Script in ServerScriptStorage. Here is the part of my script that will teleport the players in the lobby:
PlayerList = game.Players:GetChildren()
PlayersToSend = Lobby.Players:GetChildren()
local TeleportService = game:GetService("TeleportService")
local code = TeleportService:ReserveServer(5229734511)
for i, v in pairs(PlayerList) do
for j, w in pairs(PlayersToSend) do
if PlayersToSend[j].Name == PlayerList[i].Name then
TeleportService:TeleportToPrivateServer(5229734511,code,PlayerList[i])
end
end
end
I'm getting the error of "Unable To Cast Value To Object" Please help.

3 comments
The Lobby.Players are IntValues
What do the int values represent?
I edited it so it would work with your previous system, just a little bit easier.