Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a script constantly check a bool value, and if its true/false it does something?

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.

3 comments

0

why not use a while true do

0

its the best way to do it

0

Infinite loops should be avoided

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.