[Fixed it by myself]
Tried this, works sometimes, sometimes fails..
1 | local Difficulties = { "Hard" , "Easy" , "Normal" } |
2 | table.sort(Difficulties, function (a,b) |
3 | return math.random() > 0.5 |
4 | end ) |
5 | print (table.concat(Difficulties, ' ' )) |
Error: 13:17:48.509 - Workspace.Script:5: invalid value (nil) at index 1 in table for 'concat'
Why not grab a random value from the table?
1 | Difficulties [ math.random( 1 , #Difficulties) ] |
Also, see http://wiki.roblox.com/index.php?title=Random_numbers#math.randomseed.