How can I make it so my game will evenly sort my teams when a new game starts?
-NeedingHelp
Dear NeedingHelp,
That's simple! First thing to remember is that you need to have a effective method of doing so. For me, that method is using variable change. Here's an example:
Team = 1
TeamColor1 = "Really red" --Change to Team 1's color
TeamColor2 = "Lime green" --Change to Team 2's color
for _,v in pairs(game.Players:GetPlayers()) do
if Team == 1 then
Team = 2
v.TeamColor = BrickColor.new(TeamColor1)
elseif Team == 2 then
Team = 1
v.TeamColor = BrickColor.new(TeamColor2)
end
end
That's a default roblox feature.
ReplyDeleteI'd suggest putting this in a custom function for easy activation in a game script.
ReplyDelete@Liama517 The person means re-sorting. Not having a player be sorted on enter.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete@BCGames- NeedingHelp is just a newbie. He still looks like the default character they gave you towards when roblox started. So I have a question, did NeedingHelp really send you this question or did you just come up with it?
ReplyDelete@Doogy
ReplyDeleteWhen they submit something, they don't need to submit their actually username. I have no idea who submitted this, but they entered the name as 'NeedingHelp'.
@BCGames, oh. Interesting.
ReplyDelete