Ad
Log in to vote
3

I need help with a script?

Asked by
Prioxis 673 Moderation Voter
7 years ago
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?

0
When you say kick everyone off the teams every 60 seconds, do you mean defaulting them to a different team? Sublimus 992 — 7y
1
No like making them no longer on a team just neutral Prioxis 673 — 7y

1 answer

Log in to vote
0
Answered by
reaper5 10
7 years ago
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
Ad

Answer this question