Search
 
SCRIPT & CODE EXAMPLE
 

LUA

how to get a random number in lua

local randomNumber1 = math.random(1, 10) --Returns a number between 1 and 10.
local randomNumber2 = math.random(10) --Also returns a number between 1 and 10.

print(randomNumber1, randomNumber2) --OUTPUT EXAMPLE: "6, 8"
Comment

lua random number

local number = math.random(1, 10)
# change 1 to be the smallest possible number
# change 10 to the be the biggest possible number
Comment

lua random numbers printing

local randomnumber = Math.Random(1, 10) -this is a random number between 1 and 10
local canprint = True
local count = 0

while canprint do --gonna loop when canprint is true
    Print(randomnumber) --gonna print random number
    wait(1) --waiting one sec
    count = count + 1 --gonna count to one. it will say that we have done it 1 time already
    if count == 10 then --if we print it 10 times it will count canprint as false
        canprint = false        
Comment

PREVIOUS NEXT
Code Example
Lua :: sleep function lua 
Lua :: luau region3 
Lua :: lua for each in table 
Lua :: roblox kill brick script 
Lua :: roblox difference between index and newindex 
Lua :: roblox how to make debounce 
Lua :: roblox how to loop through all players 
Lua :: roblox lua gui drag 
Lua :: roblox how to find something in table 
Lua :: roblox go thru all players 
Lua :: for i in pairs lua 
Lua :: make string all capital roblox 
Lua :: roblox random number generator 
Lua :: how to print in lua 
Lua :: lua script 
Lua :: What is CanCollide in roblox? 
Lua :: How to Register a command in Lua 
Lua :: gun that shoot automaticly roblox 
Lua :: lua prin type of variable 
Lua :: lua teleport 
Matlab :: matlab title figure 
Matlab :: matlab preallocate array size 
Matlab :: matlab avoid plot to get focus 
Basic :: theme leaf concatenate 
Basic :: add combobox in datagridview vb.net 
Elixir :: elixir enum all 
Scala :: scala get file from url as string 
Scala :: for scala example 
Actionscript :: react native uuid 
Excel :: Date and Time maths with Excel 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =