Question, How would I make a random number

How would I make a random number. here’s an example:

local Chance = --insert code here

Thank you, anything helps.

Not sure if this is exactly what you need, but you could use math.random() for rngs.
Example:

print(math.random(1,10)) -- prints a randomly generated number ranging from 1 to 10
2 Likes

Thank you @uhSkittle :+1: :+1: :+1:

Another method you can use is Random.new():NextInteger(1,10) for a random integer from 1 to 10 or Random.new():NextNumber(1,10) for a random number from 1 to 10.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.