Bool Value script

How do i make a script that waits until a Bool Value is set to false?

Try this:

repeat wait() until boolValue.Value == false

i did but the script somehow did not detect it when i changed the value from the explorer back to false as a test

Where is the value stored? Could you send a screenshot? Maybe you wrote the instance address wrong

Okay, I forgot something.

If you manually check/uncheck the value while testing and your script is working on the server, you are manipulating the value in the client, not in the server, that’s why the script is not detecting the change! Try switching the value in a server script and tell me if it works.

You can also use boolvalue.Changed:Wait() but this won’t detect if it’s true or false, just yield until the bool value has changed

oh sorry for my late reply i was watining for post approval with photos but let my try that

1 Like

its a bit buggy but yea its an option

it works now thank you so much

1 Like
if BoolValue.Value then BoolValue.Changed:Wait() end

Screenshot (1721)

and a part of the script with the problem

if oneV.Value == false then
oneV.Value = true
Humanoid:MoveTo(one.Position)

else
if twoV.Value == false then
twoV.Value = true
Humanoid:MoveTo(two.Position)
repeat wait() until oneV.Value == false
Humanoid:MoveTo(one.Position)