Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

what ismath.randomseed and why doesnt the script work? (answered)

function setup()
    local x = math.random(1,100)
    local printer = math.randomseed(x)
        print(printer)
    end

while wait(3) do
setup()
end

I tried learning math.randomseed manually but it only prints nil can someone explain what math.randomseed, why it is usefull and why my script isnt working?

1 comment

0

Output: nil nil nil nil nil

1 answer

Just found it out, it changes the possibilities to math.random.

Example:


math.randomseed(os.time())
local function Print()
	print(math.random(1, 100))
	end

	
	Print()
Print()
Print()
Print()
Print()
Print()
Print()

96 comments

1

im big brain smart i think if im wrong plz comment

1

im big brain smart i think if im wrong plz comment

1

im big brain smart i think if im wrong plz comment

1

im big brain smart i think if im wrong plz comment

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

peace

1

lag

1

lag

1

are you ok

1

no

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

1

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

1

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

0

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

1

ahhhh

This discussion is preserved as it was. New answers, comments, and votes are closed.