How to Get Player Models From A Table

Hey Forum, currently I’m working on a queue system and I have everything down except for the teleport.

Here’s an example of what I’m trying to do:

local players = {"Clxzed", "Roblox"}

t_TPService:TeleportToPrivateServer(1, accessCode, PLAYERSGOHERE nil, nil, script.LoadingScreen)

I’ve tried using GetChildren, but it didn’t work, and FindFirstChild doesn’t work for a multiplayer game.

I’m pretty sure you need a table of the players objects, not strings.

Okay, so say I do have a table of Playermodels, how to I teleport them?

EDIT: Fixed my terms :slight_smile:

you could try using ipairs for that:

local players = {"Clxzed"}

for x, i in ipairs(players) do
	t_TPService:TeleportToPrivateServer(1, accessCode, game.Players[i] nil, nil, script.LoadingScreen)
end

maybe this is what you’re looking for?

1 Like

It can’t be an Instance, it has to be a string.

have you tried to code yet, or you’re assuming?

since the code what i sent basically finds the player’s based on the names given in the table

The table gets the player Instance, adjusted to what @Ready2XD said.

try finding the players by their names in the models and then try to teleport them by modifying my code maybe?

1 Like

SOLUTION: TeleportPartyAsync is a better option, please use TeleportPartyAsync.

TeleportService | Documentation - Roblox Creator Hub

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.