Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 16 Aug 2012 01:25 PM |
local red1 = script.Parent.reda local red2 = script.Parent.redb local red3 = script.Parent.redc --red section ----------------------------------<-Divider-> --blue section local blu1 = script.Parent.bluea local blu2 = script.Parent.blueb local blu3 = script.Parent.bluec while wait() do if game.Workspace.Capturea.Stat.Value = true script.Parent.red1.Visible = true script.Parent.blu1.Visible = false -- game.Workspace.Captureb.Stat.Value = true script.Parent.red2.Visible = true script.Parent.blu2.Visible = false -- game.Workspace.Capturec.Stat.Value = true script.Parent.red3.Visible = true script.Parent.blu3.Visible = false -- Above = if raider takes the flag. -- True and False border? -- Below = if UNSC takes the flag. game.Workspace.Capturea.Stat.Value = false script.Parent.red1.Visible = false script.Parent.blu1.Visible = true -- game.Workspace.Captureb.Stat.Value = false script.Parent.red2.Visible = false script.Parent.blu2.Visible = true -- game.Workspace.Capturec.Stat.Value = false script.Parent.red3.Visible = false script.Parent.blu3.Visible = true end end |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 01:28 PM |
Use "and" for multiple statements and "==" for checking if two values are equal.
if ((this == true) and (that == true) and (stuff == false)) then --blah end |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
| |
|
|
| 16 Aug 2012 01:29 PM |
All your value =
need to be value == |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 16 Aug 2012 01:33 PM |
local red1 == script.Parent.reda local red2 == script.Parent.redb local red3 == script.Parent.redc --red section ----------------------------------<-Divider-> --blue section local blu1 == script.Parent.bluea local blu2 == script.Parent.blueb local blu3 == script.Parent.bluec while wait() do if game.Workspace.Capturea.Stat.Value == true script.Parent.red1.Visible == true script.Parent.blu1.Visible == false -- game.Workspace.Captureb.Stat.Value == true script.Parent.red2.Visible == true script.Parent.blu2.Visible == false -- game.Workspace.Capturec.Stat.Value == true script.Parent.red3.Visible == true script.Parent.blu3.Visible == false -- Above = if raider takes the flag. -- True and False border? -- Below = if UNSC takes the flag. game.Workspace.Capturea.Stat.Value == false script.Parent.red1.Visible == false script.Parent.blu1.Visible == true -- game.Workspace.Captureb.Stat.Value = false script.Parent.red2.Visible == false script.Parent.blu2.Visible == true -- game.Workspace.Capturec.Stat.Value == false script.Parent.red3.Visible == false script.Parent.blu3.Visible == true end end
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 01:34 PM |
Not all of them... Only when you have an "if", and when you do, put a "then".
† KMXD † |
|
|
| Report Abuse |
|
|
Keyrut
|
  |
| Joined: 23 Nov 2011 |
| Total Posts: 6501 |
|
|
| 16 Aug 2012 01:41 PM |
local red1 = script.Parent.reda local red2 = script.Parent.redb local red3 = script.Parent.redc --red section ----------------------------------<-Divider-> --blue section local blu1 = script.Parent.bluea local blu2 = script.Parent.blueb local blu3 = script.Parent.bluec while wait() do if then game.Workspace.Capturea.Stat.Value == true script.Parent.red1.Visible == true script.Parent.blu1.Visible == false -- game.Workspace.Captureb.Stat.Value == true script.Parent.red2.Visible == true script.Parent.blu2.Visible == false -- game.Workspace.Capturec.Stat.Value == true script.Parent.red3.Visible == true script.Parent.blu3.Visible == false -- Above = if raider takes the flag. -- True and False border? -- Below = if UNSC takes the flag. game.Workspace.Capturea.Stat.Value == false script.Parent.red1.Visible == false script.Parent.blu1.Visible == true -- game.Workspace.Captureb.Stat.Value = false script.Parent.red2.Visible == false script.Parent.blu2.Visible == true -- game.Workspace.Capturec.Stat.Value == false script.Parent.red3.Visible == false script.Parent.blu3.Visible == true end end
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 01:46 PM |
UGM ufail whoever said you need == for everything! Dumbo!
local red1 = script.Parent.reda local red2 = script.Parent.redb local red3 = script.Parent.redc
local blu1 = script.Parent.bluea local blu2 = script.Parent.blueb local blu3 = script.Parent.bluec
while true do
if game.Workspace.Capturea.Stat.Value == true then script.Parent.red1.Visible = true script.Parent.blu1.Visible = false end
if game.Workspace.Captureb.Stat.Value == true then script.Parent.red2.Visible = true script.Parent.blu2.Visible = false end
if game.Workspace.Capturec.Stat.Value == true then script.Parent.red3.Visible = true script.Parent.blu3.Visible = false end
if game.Workspace.Capturea.Stat.Value == false then script.Parent.red1.Visible = false script.Parent.blu1.Visible = true end
if game.Workspace.Captureb.Stat.Value == false then script.Parent.red2.Visible == false script.Parent.blu2.Visible == true end
if game.Workspace.Capturec.Stat.Value == false then script.Parent.red3.Visible == false script.Parent.blu3.Visible == true end
end
It would be more efficient to make a .Changed function. I am not going to write all that for you though. :3
------------------------- ~thedestroyer115, some of the most kind and helpful posts possible!~ |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 01:49 PM |
@destroyer
you need a wait() so it doesn't crash
and you defined the variables but didn't even use them
"UGM ufail whoever said you need == for everything! Dumbo!"
very "kind"
change ur sig pl0x
~This sig is false~ |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 01:52 PM |
Who said I didn't want to crash his Roblox tab? ;)
Yes add a wait(0.5) before the last end.
And hey, I am not going to clean the mess he made. I am only going to fix it.
------------------------- ~thedestroyer115, some of the most kind and helpful posts possible!~ |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 01:55 PM |
calling someone a "dumbo" is not one of "the most kind and helpful posts possible!"
~This sig is false~ |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 01:57 PM |
------------------------- ~thedestroyer115, some of the most kind and helpful posts possible (But not to xXTheRobotXx)!~
Vala
------------------------- ~thedestroyer115, some of the most kind and helpful posts possible!~ |
|
|
| Report Abuse |
|
|