BOOC2002
(BOOC2002)
February 26, 2024, 4:03am
#1
What do you want to achieve? If I made Script
Local Numbers = math.random(1,2)
print(Numbers)
Answer From OutPut
1,
1
1
1
1
Or
2,
2
2
2
2
How can i fix it?
I need Make Randomize
1,
2
2
1
2
1
1
So you Understand...
What is the issue? Include screenshots / videos if possible!
“NULL”
What solutions have you tried so far? I try To see in youtobe about Random
I Not Undestand
debugMage
(debugMage)
February 26, 2024, 4:10am
#2
Random.new():NextInteger(1, 2)
BOOC2002
(BOOC2002)
February 26, 2024, 4:11am
#3
The Not the Best Solution… If Its 1 Its gonna be 2
debugMage
(debugMage)
February 26, 2024, 4:16am
#4
local random = Random.new()
print(random:NextInteger(1, 2))
You have to call NextInteger
every time you want a new random number between the range. Storing the result as a variable won’t get a new number, it’ll only store the result.
1 Like
system
(system)
Closed
March 11, 2024, 4:16am
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.