Let's pretend I have a ModuleScript MultiReturnModule.
It has two things that it wants to send to other scripts: the value PartCount
PartCount = 0 for i,v in pairs(Workspace:GetDescendants()) do -- doot if part:IsA("BasePart") then -- if izza part PartCount = PartCount + 1 -- 1UP end end
and the boolean
true
Is it possible that it could return both of these values having to group them together and probably putting true
into a variable? (what I'm thinking here on the question: return PartCount, true
)
Yes you can do that. Example:
function numx2(x) return x,x*2 end local orig,x2 = numx2(8) print(orig,x2) --> 8 16
Sorry for the weird example just thinking off the top of my head.