local rep = game:GetService(“ReplicatedStorage”)
local playingCount = rep:WaitForChild(“playingCount”)
local Status = rep:WaitForChild(“Status”)
while true do
Status.Value = “waiting...”
repeat wait(1) until playingCount.Value > 0
Status.Value = “starting...”
end
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:
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

4 comments
The code is always going to repeat until playingCount.Value is greater than 0. By the way, wrong quotes.
playingCount.Value is greater than 0. I manually change it in the inspector thing
Do you change the value in this code or another code?
i change the value of the intValue in another code. but playingCount is the reference of the value I change