I'm trying to make a function to be used with a brick, and if the brick is a MeshPart then the function should accept a MeshId as a parameter. Unfortunately, I couldn't figure out how to add optional parameters. Would anyone be able to help out? Here's a simplified version of the code I'm using:
local Brick={}
function Brick.new(brickType,optionalMeshIdParameter)
--do stuff
end
return Brick
Thanks for helping!

1 comment
Do you mean parameters that can have default values if no arguments are passed to them?