Whenever I say repeat wait() until foo or bar
, the repeat keeps waiting until foo AND bar is true. Why is that, and how can I fix this?
I believe this is an issue with your code. This example works as it should
local foo, bar spawn(function() wait(math.random(1, 5)) foo = true wait(math.random(1, 5)) bar = true end) repeat print(foo, bar) wait() until foo or bar print(foo, bar)
Output:
nil nil (x30) true nil