I am fairly new to coding in roblox, and I am wondering how I would only teleport one specific team, i have the script for teleporting working, but it teleports everyone instead of one team. And I have no clue where to start to make it so it only teleports one team. If anybody can help, or at least point me in the right direction, thanks in advance!
Here's my code for teleporting:
local plrs = game.Players:GetChildren()
for i = 1, #plrs do
local num = math.random(1, 9)
plrs[i].Character.Head.CFrame=CFrame.new(workspace.Teleports["Spawn"..num].Position)
end
I have two teams, "Playing" and "Spectating", but I only want to teleport the "Playing" team.

1 comment
That clears quite a few things up, thanks for helping