turma1
|
  |
| Joined: 19 Apr 2009 |
| Total Posts: 1495 |
|
|
| 06 Aug 2012 07:56 PM |
| Hey guys I need a script that divides two teams equally and one team with only person that resets manually and redivides every 10 minutes. Is this possible? |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 07:57 PM |
| Of course it's possible! The algorithm might be a little difficult, however. |
|
|
| Report Abuse |
|
|
turma1
|
  |
| Joined: 19 Apr 2009 |
| Total Posts: 1495 |
|
|
| 06 Aug 2012 08:04 PM |
| Do you think you could help me out with it? I know nothing. |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 06 Aug 2012 09:28 PM |
Try this.
teamSvc = game:GetService("Teams")
teams = {teamSvc.Team1, teamSvc.Team2} -- change Team1 and Team2 to the correct team name. team3 = teamSvc.Team3 -- change Team3 to the team that should only have 1 player
while (wait(600)) do game:GetService("Teams"):RebalanceTeams() for i, v in pairs(team3:GetChildren()) do local t = teams[math.random(1, 2)] v.Parent = t end local t = teams[math.random(1,2)] local p = t[math.random(1, #t)] p.Parent = team3 end
|
|
|
| Report Abuse |
|
|
turma1
|
  |
| Joined: 19 Apr 2009 |
| Total Posts: 1495 |
|
|
| 07 Aug 2012 11:56 AM |
| Thanks that looks awesome! |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2012 12:45 PM |
@pwned
I don't think Teams is a hidden service anymore, so couldn't you just do game.Teams?
local siggy = '~This sig is fase~' |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 07 Aug 2012 01:38 PM |
@Math Some people rename their services for some reason so it's just good practice to use `:GetService()` |
|
|
| Report Abuse |
|
|