I was wondering how I could make it so someone is the killer twice as much more than anyone else. Any ideas? Thanks.
Throw everyone's name into a table for one to be chosen randomly out of it, and for each player with twice the chance, put their name in the table twice.
01 | local twice = { [ '1waffle1' ] = true , [ 'peoplemove12' ] = true } |
02 | local t = { } |
03 | for _,v in pairs (game.Players:GetPlayers()) do |
04 | t [ #t+ 1 ] = v.Name |
05 | if twice [ v.Name ] then |
06 | t [ #t+ 1 ] = v.Name |
07 | end |
08 | end |
09 |
10 | local chosen = t [ math.random( 1 ,#t) ] |