So i am working on a function that will make it so i can have the same function for different variables. Here's what I tried:
function Multival (func, amt)
local ValsToReturn
for i = 1, amt, 1 do
ValsToReturn = ValsToReturn, func
end
return ValsToReturn
end
func is the function you need to call, amt is the amount of times you need to repeat it. the func returns something.

3 comments
I think this idea is fundamentally flawed. Just use the standard loops and create a separate function for everything. A function should have 1 and only 1 purpose. Think about it this way: Your function is going to loop through other functions. Thats basically useless, if you've already created a function, just loop it separately. Forgive me if im forgetting something or missing something here.
I should have said that i was trying to use it as: local val1, val2, val3, val4 = Multival (functionTest(), 4)
Oh I gotcha! Ill write a solution now.