hmm yeah but i tried making a loop that does GetPlayerFromCharacter for each one but that gave out a different error cuz apparently theres supposed to be a table of players instead of just one
What you could do, this is just a general idea you are gonna have to edit it
local PlayersToTeleport = {}
for i, v in pairs(game.Workspace.ServerQueues[servernum]:GetChildren()) do
table.insert(PlayersToTeleport, game.Players:GetPlayerFromCharacter(v))
end
This will then give you a table of Player Instances which you can use to teleport them, I am assuming this would work since it insert’s each player instance in the table and then if you teleport them using the table its still formatted as a table.
Okay cool, It would be something similar to this I believe:
local tps = game:GetService("TeleportService")
game.ReplicatedStorage.SetQuratue.OnServerEvent:Connect(function(plr, servernum)
local PlayersToTeleport = {}
for i, v in pairs(game.Workspace.ServerQueues[servernum]:GetChildren()) do
table.insert(PlayersToTeleport, game.Players:GetPlayerFromCharacter(v))
end
local privpvpserver = tps:ReserveServer(14850593104)
tps:TeleportToPrivateServer(14850593104,privpvpserver,PlayersToTeleport)
end)