I want to make it so that when a new game starts 15 seconds in a person will be randomly selected to be it which will make them be on the orange team. Very much like a hide and seek script. Here's the script.
function FirstInfected()
Wait(15)
players=game.Players:GetPlayers()
while player>=1 do
first_infected=players[math.random(1, #players)]
first_infected.TeamColor=BrickColor.new("Bright orange")
end
end
FirstInfected()

2 comments
What;s the problem? That looks fine.
I don't know its just whenever I try it it wont work. Would it matter that the orange team isnt auto assignable?