Hello. I am new to scripting in roblox studio and in LUA in general. I've gotten pretty far in the game I'm making, but I have one problem. I'm trying to make a script in which everyone is transported to one team when a countdown is over, but I can't get everyone to change the team. This is what I have so far:
local inGame = game.Players:GetPlayers() [#game.Players:GetPlayers()] inGame.TeamColor = BrickColor.new("CGA brown")
The problem is that when I run this script it only has the last person who joined the game join the team, but everyone needs to join at the same time. What I'm looking for is something that works like this:
[1 through #game.Players:GetPlayers()]
Of course, "through" is not an actual function, but I need something that would work like that. Could someone tell me if a function like that exists, and how it works?
Thanks in advanced!

1 comment
So, what LUA? http://acronyms.thefreedictionary.com/lua