|
| 16 Feb 2014 11:52 AM |
| I want if a bool value is true in workspace that it continues a script. if it is false it does a certain thing. How would I do that? |
|
|
| Report Abuse |
|
|
SFOH
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 293 |
|
|
| 16 Feb 2014 11:54 AM |
Check for the BooleanValue's value.
If workspace.bool.Value then--bool is true --do something else --do something else because its false end |
|
|
| Report Abuse |
|
|
| |
|
Gorake
|
  |
| Joined: 10 Feb 2014 |
| Total Posts: 219 |
|
|
| 16 Feb 2014 11:55 AM |
Lucky for you, there are things called 'conditional statements' in Lua, and they're almost exactly the same as english.
You said: if a bool value is true, do one thing. Else if it is false, do another.
In Lua, that would be:
local bool = Workspace.BoolValue if bool.Value == true then --Continue else --Do specific thing end
BTW, you don't even need the == true part, this would work too:
if bool.Value then --Continue else --Do something else end |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2014 11:55 AM |
| Wait would it continue to do that? Like loop. I am making it for a round timer. |
|
|
| Report Abuse |
|
|
SFOH
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 293 |
|
|
| 16 Feb 2014 11:57 AM |
| @Gorake good job copying my post |
|
|
| Report Abuse |
|
|
Gorake
|
  |
| Joined: 10 Feb 2014 |
| Total Posts: 219 |
|
|
| 16 Feb 2014 11:59 AM |
USA, use a while loop if you want something to happen over and over. Read up on them here: http://wiki.roblox.com/index.php?title=Loops#While |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 16 Feb 2014 12:01 PM |
| yeah USA you need to read up your questions are so self explanitory |
|
|
| Report Abuse |
|
|