Pretty straightforward, I have this function here
function doCooldown(Origin)
Origin.isCooldown.Value = true
wait(Origin.CooldownTime.Value)
Origin.isCooldown.Value = false
end
and I want to multithread it with coroutine.wrap()
, a function that takes another as an argument.
This needs to be multithreaded since this will run in a script with multiple other Origin
objects being affected at the same time.
So now I’m doing
coroutine.wrap(doCooldown(Origin))
, but in this code, the argument for coroutine.wrap()
is the function firing, not the function with the argument I want to give.
I’ve gotten around this problem with a much worse way, if I remember correctly, by putting the multithreaded inside another function where I can define the arguments prior to the actual multithread
I don’t want to do that, so this problem now appears as an obstacle to the only way I can accomplish this.