how do I end the endless suffering of this repeat?
01 | local rep = game:GetService(“ReplicatedStorage”) |
02 | local playingCount = rep:WaitForChild(“playingCount”) |
03 | local Status = rep:WaitForChild(“Status”) |
06 | Status.Value = “waiting...” |
08 | repeat wait( 1 ) until playingCount.Value > 0 |
10 | Status.Value = “starting...” |
playingCount is an intValue in replicatedstorage.
I have it so that the click of a GUI button will increase playingCount by 1.
I checked the value manually, it does increase. but the “repeat wait(1) until ...” never stops waiting(1).
to test it out, i did this:
1 | repeat print (playingCount.Value) wait( 1 ) until playingCount.Value > 0 |
and despite the value actually being 1, the script variable remains 0
how fix? need 2 fix. am not know how fix. thx