i want know if its possible create a random value between 6 values to put in stringvalue in leaderstats, i can do this using math random? if yes, how?
COMMUNITY QUESTION
Its possible create a random Value in the leaderstats, but in a StringValue?
1 answer
If you mean between 6 values allready selected, but need to chose a random one, just use math.random() and associate a number with a string.
3 comments
0
like math.random(1,2,3,4,5,6) 1 = balbla 2 = lele 3 = dasldlsa 4 = asfsada 5 = asfxc 6 = asdcmasf?
0
or myTable[1] = "A value"?
0
No, math.random accepts 2 arguments, a minimum, and maximum number. Combine with some if statemnets.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
StringValue.Value = math.random(1,6)
Well if you mean that you have 6 values already and you'd like to randomly select one then you can put them into a table and then do StringValue.Value = someTable[math.random(1,6)]
like math.random(1,2,3,4,5,6) 1 = balbla 2 = lele 3 = dasldlsa 4 = asfsada 5 = asfxc 6 = asdcmasf?
or myTable[1] = "A value"?