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

What does the things between the parentheses mean? (Solved)

This might sound stupid, but I am a beginner developer and don't know what these things mean, can somebody help?

Example:

local function placeBarrier(barrierNumber, barrierPlace)

I would really like to know what those mean.

1 answer

✓ Accepted answer

Arguments & Parameters

This is what is formally known as a parameter. It is a specially declared variable within the function, that refers and contains information provided during the operation of said function.

The way we assign this data, is by supplying arguments. These are passed through the parentheses of the function when it is called. Here is a better visualization of how this process occurs:

local function multiply(numberOne, numberTwo)
    print(numberOne * numberTwo)
end

multiply(2,5) --> 10

This allows the function to take in specific data, and use it accordingly; your function would need to know where and what barrier to place, so it requires that you supply these parameters so it knows what to use.

1 comment

0

Thanks!

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