|
| 01 Jan 2016 11:39 AM |
| I'm having an issue choosing any number of random players that are all different from the player list. http://pastebin.com/mXEYZag4 is my current code and it keeps returning the same players twice |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2016 11:43 AM |
local p = game.Players:GetChildren() local Players = {} local random = {}
for i = 1, #p do table.insert(Players, p[i]) end
for i = 1, 3, 1 do wait() table.insert(random, Players[math.random(1, #Players)]) end
Maybe
The Legend of Heroes Sen no Kiseki |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2016 11:44 AM |
local p = game.Players:GetChildren() local Players = {} local random = {}
for i = 1, #p do table.insert(Players, p[i]) end
for i = 1, 3, 1 do wait() local x = Players[math.random(1, #Players)] table.insert(random, x) table.remove(Players, x) end
The Legend of Heroes Sen no Kiseki |
|
|
| Report Abuse |
|
|
deedeedum
|
  |
| Joined: 15 Jan 2007 |
| Total Posts: 19 |
|
|
| 01 Jan 2016 11:47 AM |
no
local plrs = game.Players:GetPlayers()
local chosen = {}
for i = 1,3 do local n = math.random(1,#players) local c = Players[n] table.insert(chosen,c) table.remove(Players,n) end |
|
|
| Report Abuse |
|
|