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

how do i randomize functions?

how do that plz tell i'm dumb plz plz plz

1 comment

0

Could you please better define what you are trying to do?

1 answer

lets say you have functions called foo, foo2, foo3,

local functions = {foo, foo2, foo3}

to get a random function, you'd get a random position in the table, then call that function

local randomPosition = math.random(1, #functions)
functions[randomPosition]()

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