function WaveWait()
SkipWave.Value = 1
CheckForEnemies()
repeat
print(Enemies)
wait(0.5)
CheckForEnemies()
until PlayerSkippedWave.Value == 1 or Enemies == 0
SkipWave.Value = 0
PlayerSkippedWave.Value = 0
end
So, I have this loop inside this function. However, when PlayerSkippedWave.Value = 1 the loop does not end for some reason. PlayerSkippedWave is a NumberValue. Anyone have an idea of why it's broken?

3 comments
From where are you changing the value of "PlayerSkippedWave" , Server or Client ? And is that function server-sided or client-sided ?
Yeah ^^^ if you're changing the value of an intValue (which is on the server) from a local script, you won't make any changes to the value itself. You need a remote event for that.
repeat <what you're doing> until