Xeranus
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 1101 |
|
|
| 13 Sep 2015 04:36 PM |
Script isn't working. Output is title.
while wait(1) and game.Players.NumPlayers ~= 0 do local hum = game.Players:GetPlayers()[math.random(1, game.Players:GetPlayers())].TeamColor if hum then hum.TeamColor = BrickColor.new("Bright Red") hum:LoadCharacter() end end |
|
|
| Report Abuse |
|
|
xlaser23
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
|
| 13 Sep 2015 04:37 PM |
Trying using () instead of []
http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$210 Tx2,112 |
|
|
| Report Abuse |
|
|
TwoRivers
|
  |
| Joined: 25 Aug 2011 |
| Total Posts: 2821 |
|
|
| 13 Sep 2015 04:39 PM |
Correct answer:
game.Players:GetPlayers()[math.random(game.Players.NumPlaayers)]
-TwoRivers/Iterum/Vulnerite/ChiefDelta/Discommodate/100+ accounts |
|
|
| Report Abuse |
|
|
Xeranus
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 1101 |
|
|
| 13 Sep 2015 04:39 PM |
| Still didn't work, and had the same output. |
|
|
| Report Abuse |
|
|
TwoRivers
|
  |
| Joined: 25 Aug 2011 |
| Total Posts: 2821 |
|
|
| 13 Sep 2015 04:41 PM |
*Players
-TwoRivers/Iterum/Vulnerite/ChiefDelta/Discommodate/100+ accounts |
|
|
| Report Abuse |
|
|
Xeranus
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 1101 |
|
|
| 13 Sep 2015 04:43 PM |
@Two,
I have a hum.LoadCharacter after all of it to see if it works, and all it does is load character over and over. It skips the team color change. No output, just skips it? |
|
|
| Report Abuse |
|
|
Xeranus
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 1101 |
|
| |
|
nox7
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 27467 |
|
|
| 13 Sep 2015 05:00 PM |
It "skips" the color change because:
BrickColor.new("Bright Red")
Is not a color.
BrickColor.new("Bright red")
Is correct. |
|
|
| Report Abuse |
|
|
TwoRivers
|
  |
| Joined: 25 Aug 2011 |
| Total Posts: 2821 |
|
|
| 13 Sep 2015 05:00 PM |
should've read full code smh
-TwoRivers/Iterum/Vulnerite/ChiefDelta/Discommodate/100+ accounts |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 05:02 PM |
while wait(1) and game.Players.NumPlayers ~= 0 do local hum = game.Players:GetPlayers()[math.random(1, #game.Players:GetPlayers())].TeamColor if hum then hum.TeamColor = BrickColor.new("Bright Red") hum:LoadCharacter()
end end |
|
|
| Report Abuse |
|
|
Xeranus
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 1101 |
|
|
| 13 Sep 2015 06:43 PM |
| Sorry, one more thing. It works, but this is meant to pick a random person to be 1 enemy for the round, what would I use to make all other players on another team besides the one picked? |
|
|
| Report Abuse |
|
|