Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need help with a script?

local numPlayers = 0

for i, v in next, game.Players:GetPlayers() do
if v:FindFirstChild("TeamColor") == BrickColor.new("Bright red") then
numPlayers = numPlayers + 1
elseif v:FindFirstChild("TeamColor") ~= BrickColor.new("Bright red") then
    numPlayers = numPlayers - 1
end
end

if numPlayers == 0 then

local player = game.Players:GetPlayers()

local pickedPl = math.random(1, #player)
pickedPl.TeamColor = BrickColor.new("Bright red")

end

I got my script to where it'll put one person on one team and everyone else on the other basic team chooser script but now I need it to kick everyone off the teams every 60 seconds how would I do that can someone help me?

2 comments

0

When you say kick everyone off the teams every 60 seconds, do you mean defaulting them to a different team?

1

No like making them no longer on a team just neutral

1 answer

wait(60)
a = game.Players:GetChildren()
for i = 1,#a do
	player = a[i]
	player.Neutral=true
	player.TeamColor=BrickColor.new("White")
	game.Workspace[a[i].Name].Torso.Name=("")
end

This discussion is preserved as it was. New answers, comments, and votes are closed.