Not exactly sure what you're asking, but I'll try my best to give some information on parameters.
So, let's say that we have a function that will create a part, and it takes in a few parameters: Size, Position, Color, and finally PartType. Let's go ahead and setup such a function.
local createPart = function(s, p, c, pT)
if pT:lower() == "part" then
local i = Instance.new("Part", workspace)
i.Size = s
i.Position = p
i.BrickColor = c
return i
elseif pT:lower() == "wedge" then
local i = Instance.new("WedgePart", workspace)
i.Size = s
i.Position = p
i.BrickColor = c
return i
end
end
local myPart = createPart(Vector3.new(4, 4, 4), Vector3.new(0, 50, 0), BrickColor.palette(math.random(0,127)), "Part")
So, the above function sets up a function that, again, takes in some parameters for making a part. We can call this function and supply it the parameters that we want, and voila.
There's a lot you can do with parameters, so with the information you've been given, experiment around and you'll get the hang of it in no time.
Hope this helps,
MINEBLOX106.
3 comments
Please format your code with the Lua button.
Edited to fix code formatting
Basically, a parameter is a variable without value, the only time it can be 'valued' is if it is assigned when the function is called.