Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Its possible create a random Value in the leaderstats, but in a StringValue?

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?

4 comments

0

StringValue.Value = math.random(1,6)

0

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)]

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"?

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.