Hello, everyone!
Currently I am trying to make my code look beautiful: I am trying to set classes for arguments in functions.
But, I don’t know how to set class for return value from function? So instead of it would return (for example) .
Here is the function:
local function ScanForItems(model: Instance,class: string)
local items = {}
for i,v in pairs(model:GetDescendants()) do
if v:IsA(class) then
table.insert(items,v)
end
end
return items
end