I have a module script which I wanna use as a “service”. what I wanna do is:
when you use a certain custom enum value the parameter type changes, an example would be:
local Enums = {
DebrisType = {
Circle = nil,
RandomWithinCircle = nil,
Jumping = nil
}
}
local debrisService = {}
function debrisService:Create(EnumType,arg1,arg2,arg3,arg4)
if EnumType == Enums.DebrisType.Circle then
arg1 = number --This is basically what I want to do
end
end
return debrisService
To simplify:
local debrisService = {}
function debrisService:Create(EnumType,arg1 --[[ I want to change this into a number like: arg1:number]]
,arg2,arg3,arg4)
end
are you referring to overloading? currently, there are no information on roblox function overloading; and i believe that its not possible; but there could still be a workaround