#Simple print script if less than == to etc but I just can't get it to print that it's equal to two

14 messages · Page 1 of 1 (latest)

safe basin
#

local Number = 1
local Number2 = 2
local Number3 = 3
local random = math.random(Number3)
local getrandom = Random.new(random)
game:GetService('Players').PlayerAdded:Connect()

local function Zero()
print(random);

    if random == Number3  then
        print('The number is 3!')
    elseif random < Number3 then
        print('Less than number 3 (max)')
    elseif random > Number3 then
        print('Something is wrong with code (error)')
    elseif random == Number2 then
    print('The number is 2!')
    elseif random > Number2 then
    print('Less than number 2 (max)')
    
    end
end

Zero()

#

wtf

#

why is there a variable for 1,2,3

#

idk

#

just type 1,2,3 man

#

k im kinda new so i just did it like that

safe basin
#

ok

#

local random = math.random(Number3)
local getrandom = Random.new(random)
thats not how its done btw

#

its

#

local random = math.random(1,3)

#

ok tysm I just followed something off Roblox studio

#

and remove the Zero() at end, it wont work

#

u have to put it before the end)