Table Shuffle function sometimes errors

When using the function on get players, sometimes the error “Invalid random interval” will appear for the math.random function; this confuses me, as there are not 0 players, therefore the amount of players should be positive.
code context:


image

im silly

The bug was caused by attempting to index a table with an element, which would route to nil.

It still worked sometimes because it sometimes end up in a correct order.

1 Like