I’m trying to make the script repeat wait(.5) until the boolValue changes, but instead, the first time the value changes, the script doesn’t detect it, for example, when I change the value once, it didn’t detect the change, but when I changed it again, it detected it and continued with the rest of the script. I hope I’m making sense here. Also, there are no errors.
The script:
local plr = game.Players.LocalPlayer
local murderer = plr:FindFirstChild("Murderer") --This is a boolValue inside of the player
repeat wait(.5) until murderer.Changed:wait()
I changed the value using this code:
murderer.Value = not murderer.Value --it just sets it to its opposite value
The problem with the original code was that I had to change the value twice in order for it to stop repeating (I don’t know what was wrong), and that’s the script after I changed it, also, I did simplify it in my original post, so this might look different.
As the problem has already been solved, I have a nitpick, couldnt you just eliminate the bruh = true and just do murderer.Changed:Wait() replacing the repeat statement?