K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
|
| 07 Nov 2017 07:39 PM |
i have a boolean in every player, i used this
for i,v in pairs(game.Workspace.Players:GetPlayers()) do if v.Boolean == true print("Asd") end end
but that only checks if one of the players have the activated boolean
im trying to check if every player all have the booleans set all false, how would i check if everyone had it at false? |
|
|
| Report Abuse |
|
|
TaaRt
|
  |
| Joined: 26 Apr 2009 |
| Total Posts: 5039 |
|
|
| 07 Nov 2017 07:41 PM |
| I'd recommend actually wiki-ing objects before using them wrong. A boolean isnt the same as a boolvalue object and that's your problem here |
|
|
| Report Abuse |
|
|
K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
| |
|
K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
|
| 07 Nov 2017 07:43 PM |
the script isnt wrong, thats just a quick sample i wrote of a WRONG script
read the below text and u will find out what i really need |
|
|
| Report Abuse |
|
|
Chrounum
|
  |
| Joined: 04 Apr 2015 |
| Total Posts: 2911 |
|
|
| 07 Nov 2017 07:43 PM |
He just told you.
It's boolvalue, not boolean.
#code print("Thats how you lua u silly goose") |
|
|
| Report Abuse |
|
|
K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
|
| 07 Nov 2017 07:49 PM |
| yeah, im wanting to see if every players boolvalue is set to false ignore the script i posted earlier because it has clearly confused you guys |
|
|
| Report Abuse |
|
|
|
| 07 Nov 2017 07:51 PM |
if BoolValue.Value == false then --code end
BoolValue ~= boolean
#code error("you're*") |
|
|
| Report Abuse |
|
|
K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
|
| 07 Nov 2017 07:51 PM |
| i know that, but how would i check if EVERY players boolvalue was set to false |
|
|
| Report Abuse |
|
|
Chrounum
|
  |
| Joined: 04 Apr 2015 |
| Total Posts: 2911 |
|
|
| 07 Nov 2017 07:53 PM |
if v.BoolValue == false then
code
end
#code print("Thats how you lua u silly goose") |
|
|
| Report Abuse |
|
|
Skylake_X
|
  |
| Joined: 16 Jul 2014 |
| Total Posts: 275 |
|
|
| 07 Nov 2017 07:54 PM |
for _,player in pairs(game.Players:GetChildren()) do if player:FindFirstChild("BoolValue") then if player.BoolValue.Value == true then --code end end end
#code print("heck") |
|
|
| Report Abuse |
|
|
K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
|
| 07 Nov 2017 07:55 PM |
| but that would check if a single players boolvalue was false and fire the script, which i dont want to do, i want to check if all players value set to false |
|
|
| Report Abuse |
|
|
K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
|
| 07 Nov 2017 07:58 PM |
| ok thanks, sorry but I was replying to chronum not above poster but the floodcheck made me wait |
|
|
| Report Abuse |
|
|
Skylake_X
|
  |
| Joined: 16 Jul 2014 |
| Total Posts: 275 |
|
|
| 07 Nov 2017 08:00 PM |
ight, did i solve your issue?
#code print("heck") |
|
|
| Report Abuse |
|
|
K7Q
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 5546 |
|
| |
|