For some reason, my while loop only loops once. Here's the script:
while wait(waveIntermission) and waveStarted == false do if startWaveEvent and waveStarted == false then startWaveEvent:Fire() print("Wave has started") waveStarted = true end end
waveStarted variable is always false after the wave has ended, I've checked it.
Try putting the wait in the loop, not as a condition.
It is better and it could be a possible fix.
Plus, instead of doing == false
, do not
, which will be met if the value is false
while not waveStarted do wait(waveIntermission) if startWaveEvent and not waveStarted then startWaveEvent:Fire() print("Wave has started") waveStarted = true end end
Tell me if it still doesn't work