Most efficient way to wait for an action between two people

I’m making a trading system for my simulator and the way I’ve usually done this is

repeat wait() until Player1Ready and Player2Ready

I’m curious if this is the best practice because it seems like it isn’t

it is not, whenever either player checks a “ready” function, check if the other player is also ready, then proceed, that way there is absolutely no wait loop involved

Oh god I can’t believe I forgot about that. Thanks

1 Like