generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: I need help with a function

Previous Thread :: Next Thread 
Leangreen99 is not online. Leangreen99
Joined: 03 Aug 2010
Total Posts: 42
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 is not online. 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 is not online. 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
Leangreen99 is not online. Leangreen99
Joined: 03 Aug 2010
Total Posts: 42
01 Aug 2013 07:46 PM
Thanks for the help!
Report Abuse
yoloswag2k13 is not online. yoloswag2k13
Joined: 22 Jul 2013
Total Posts: 154
01 Aug 2013 08:11 PM
Or

repeat wait() until bool.Value == false
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
01 Aug 2013 08:28 PM
@yolo, that would only run once.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image