✓ Accepted answer
Your issue is rather a simple one, but a great example of syntax in Lua. You see, when you’re waiting for both of the values to be below 0, you should refer to each value in the until statement <= 0. The second value in your ending statement has already done that, but the BAmount value doesn’t have that little string in front of it. As you left it like how it is now, the game is going to assume that BAmount is a bool value (which is true/false) rather than a number value. Hopefully this isn’t too confusing, but all in all, make sure to say the <= 0 clause to each value in the until statementfor proper Lua syntax.
repeat
wait()
until game.ReplicatedStorage.BAmount.Value <= 0 or
game.ReplicatedStorage.RAmount <=0
2 comments
until game.ReplicatedStorage.BAmount.Value -> should always return true as long as it exists
So what you are saying is that I can't make it work with multiple values? It only works with one value?