I need a script so that I can make it so that 1 person is chosen to get a gun, 1 person is chosen to get a item also, and the other people get nothing. Sort of like the script used in Murder Mystery and TMM.
01 | function Choose() |
02 | Players = game.Players:children() |
03 | Luck = math.random( 1 ,#Players) |
04 | Player = Players [ Luck ] |
05 | for i,v in pairs (Players) do |
06 | if v ~ = Player then |
07 | v.TeamColor = BrickColor.new( "Team That Everyone Is On." ) |
08 | else |
09 | v.TeamColor = BrickColor.new( "Team With One Person." ) |
10 | end |
11 | end |
12 | end |
13 |
14 | --and then, When you want it to choose.... |
15 | Choose() |