✓ Accepted answer
When you run a function, you may want to add stuff to the stuff Inside the function... For that reason there are parameters!!
here is an example:
local function printText(Some_Random_Text)
print(Some_Random_Text)
end
printText("Hello world")
Like I said, you need to define whatever is in the parenthesis for later use.
More examples:
local function random(a)
print(a)
end
random(math.random(0,10))
In this example, math.random is the parameter.
Basically parameters are a random variable that soon gets defined when you call the function.
https://www.robloxdev.com/articles/Arguments-and-Parameters
Here is some more information ^^
2 comments
For a ray something like "local hit, position, normal = Workspace:FindPartOnRay(ray, ignore)" where hit is the part that was hit, position is the center of the ray and Normal returns normal to the surface that was hit (if hit). The ignore would obviously be defined locally above this line.
Methods (:) automatically pass
selfwhich is responsible for why it knows the parameter.