Making a x2 murder picker pass

I was thinking of how would I make a murder picker. I wanted it to be like this

local choseMurder = {}

then if they stay in the game longer it will be:

{player1, player2, player1, player1}

I want to remove all the names of the player that got chosen to be murder from the table, but the index will be different. So if there is any other way of doing it let me know. oh and I do not want to use math.random

Can I ask why you don’t want to use math.random() how else do you expect to get a random murderer?

1 Like

i do not know if it is a server script, so, make it a server script in SSS

wait(60)

local players = game.Players:GetChildren()
local murders = {}

murders[players[math.random(1, #players)] = 60 -- the seconds timer

for i, v in pairs(murders) do
   delay(murders[v], function()
       table.remove(murders[v])
   end)
end
1 Like

I do not want to use math.ranom is because it have a more of a chance picking the player over and over

Choose a random player with Random.new():NextNumber(1,#players), add that player to the murderer variable, and after the round ends, table.insert the last murderer to a pastMurderers table, and sort each time ignoring the table of already chosen, and if all are in the pastChosen, clear the table and return to the start of the function. Idk if I explained this right as I cannot check right now as I’m currently busy.

(or just use math.random() and math.randomseed(tick())…)

1 Like

That’s not true. To even further randomize it you can use math.randomseed()

math.randomseed(tick()) --> Randomize math.random()'s seed

This will ensure math.random() is as random as possible at any given point in time.

2 Likes

What if I wanted to make a x2 chance of becoming a murder?

Well that is a different topic…

1 Like

You’d have to do the random checking individually for every player in that case too. You can’t just modify the odds for an individual person in the way that we all explained (im pretty sure). Correct me if i’m wrong.

I believe that you’re right about it.