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

List of function parameters?

When you write a function, you have to put in two parenthesis, that can include an extra parameters to do more stuff with your script (I don't really know what the word in there actually does, because everyone's description has confused me).

Could someone write me a complete list of the words that can go in those parenthesis?

1 answer

✓ Accepted answer

Parameters are just local variables used in the declaration of a function:

function funcName(param1, param2)
end

Arguments are what you use when calling the function. The values passed as arguments are the values the parameters hold.

funcName(arg1, arg2)

There is a limit on the allowed number of parameters, but it's too high to care about. If you reach it, you need to make smaller functions.

To answer your actual question, there is no set list of allowed 'words' for parameters, just as there is no set list of allowed variable names.

2 comments

1

FYI, technically, they're upvalues. But it doesn't matter in this case.

0

Is there a case where the distinction matters? I'm legitimately curious.

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