|
| 29 Jul 2013 07:29 PM |
I want a function to run when a BooLean value I put in is false. Here's the listening event so far:
function onBooLean() -- I haven't started working on the code here yet
game.Workspace.boolean.Value == false:connect(onBooLean)
Could somebody help me please?
|
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 29 Jul 2013 07:31 PM |
bool = game.Workspace.Bool
bool.Changed:connect(function() if bool.Value == false then -- blah end end) |
|
|
| Report Abuse |
|
|
tdog158
|
  |
| Joined: 08 Jul 2008 |
| Total Posts: 5413 |
|
|
| 29 Jul 2013 07:52 PM |
Better yet, ROBLOX will pass on the value of the boolean to that anonymous function.
game.Workspace.BoolValue.Changed:connect( function( value ) if value == false then -- roxaaaaaanne end end ) |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Aug 2013 08:11 PM |
Or
repeat wait() until bool.Value == false |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 01 Aug 2013 08:28 PM |
| @yolo, that would only run once. |
|
|
| Report Abuse |
|
|