How do I make a script constantly check a bool value, and if its true/false it does something, without useing a while true do if bla bla.
✓ ANSWER ACCEPTED
How do I make a script constantly check a bool value, and if its true/false it does something?
1 answer
✓ Accepted answer
BoolValue:PropertyChangedSignal("Value"):Connect(function()
if BoolValue.Value == true then
-- Do stuff here
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
why not use a while true do
its the best way to do it
Infinite loops should be avoided