Im making a game that players join, then they create lobbys, that people can join. Once they join the lobby, the leader of it can press start. When they press start I want the game to only teleport the people in that players lobby, not everyone in the game. Is there some way to do this? Could I somehow use teams, to teleport only the players on that team? Note, im asking for an example, or idea, not the code for it.
✓ ANSWER ACCEPTED
How would I teleport only certain players to another game?
1 answer
✓ Accepted answer
I'd add a BoolValue to each player in the lobby and use a for loop in the playerlist to teleport only those whose who have the BoolValue in them
--Example
function tp()
for i, v in pairs(game.Players:GetPlayers()) do
if v:FindFirstChild("BoolValue") then
--do the teleport
end
end
end
1 comment
0
Great idea, thanks!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You could add a table?