thats a variadic function a function that will accept any number of arguments u can look it up
Example:
local function variadic(named, ...)
local arguments = {...} -- pack the extra arguments into a table
print("Named argument = ", named)
for i, value in ipairs(arguments) do
print("Input No. ", i, "=", value)
end
end
variadic(10, "Hi", 20, "Variadic Function")
This is comparable to *args and **kwargs in python.
Also to answer your question:
Yes it is, here’s how you do it:
local function MoveItem(Player, Part, ...)
local extraArgs = {…}
if extraArgs["A"] == true then
print("A is true")
elseif extraArgs["A"] == false then
print("A is false")
end
end