I see, Thank you.
But also, I believe to have Fiqured it out:
function callback(func:(testArg: string) -> ()) -- this was what I was trying to ask for
-- sorry if I was unclear, Im not good at explaining things if you couldnt tell
func("example")
end
Im not exactly sure how it works, but it works either way because now it has its own separate list of arguments.
This may not be related to the same thing, but I wills still answer it.
So Basically what I’m trying to do is make a Module that Handles Products, and for one of the functions, I had this:
function _products.iter(val, t, id, func)
assert(t ~= nil or next(t) ~= nil)
for i,v in t do
if id ~= i then continue end
val.Value = func(val.Value, v)
end
end
and I wanted the function to have its own arguments, And after figuring it out, looks like this:
func:(x: number, y: number) -> ()
and when I fire it, it would do this:
_products.iter(player.Cash, _products.CashData, 999, function(x, y)
return x + y
end)
However, may not exactly work how I want it to, I was just wondering if it was even possible to do as I saw it in Events and some callbacks.