Assign a random player with a variable

is there a way i can assign a random player with a variable. I am making a minigame and i need to randomly assign a player with a variable that will force that player chosen with the variable to be doomfist

EDIT: the variable will force that player to be doomfist

You can use Random Value In Array with the array being All Living Players when setting your variable. This will randomly pick a living player.

1 Like

@CaptCaptain what about the number or do i choose a different value to be appended to the end of the array

What do you mean by number? Are you setting a variable at an index?

when u do random value in array it will ask for the value at the bottom and that value is a number

Random Value in Array does not require a number as the value selected for the array is completely random (hence the name). All it needs is an array to pick a random value from.

I can only assume you have other actions or values that request a number, I need to see the actual code.

the game settings code is 0JTBS

The problem here is you’re using Append to Array where it isn’t necessary to.
That’s why it’s asking you for a value.


Simply setting Global Variable A to Randomized Value In Array (All Living Players) is enough.

1 Like