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 :: subsgtitute string R 
Lua :: when do true loop on roblox lua 
Lua :: random number lua 
Lua :: pico8 draw dot 
Lua :: pico8 draw sprite 
Lua :: lua math.random 
Lua :: how to make a run in roblox lua 
Lua :: genarating random number 
Lua :: enable http service roblox 
Lua :: how to activate a command if someone wears a accessory in lua roblox 
Matlab :: matlab title with variable 
Matlab :: matlab symbolic set value 
Matlab :: matlab symbolic integration 
Matlab :: how do i call a function inside another function in mat 
Basic :: how to open d drive using conda prompt 
Basic :: how to capture link cefsharp 
Basic :: visual basic excel freeze first row 
Elixir :: what is elixir language 
Elixir :: elixir enum chunk_every 
Scala :: scala list get element 
Scala :: get first string from list scala 
Actionscript :: Application insights powershell 
Excel :: google sheets if 
Perl :: perl until loop 
Perl :: how to initialize an array 
Pascal :: pascal print 
Gdscript :: gdscript while loop 
Cobol :: alertDialog with textfield validator flutter 
Assembly :: wget output filename 
Assembly :: list all sensors android 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =