so theres a value in the player
so basically i want to play a function if EVERYONE's value is false. everyone together, not client sided.
i know you have to use the i, v in pairs loop thing but how do i check if EVERYONE's value is false??
Use this, this should work since what it does is go through every current player in the server and check if the value is false, this is not client sided this is a server sided script.
for _,v in pairs(game.Players:GetPlayers()) do if v.Value == false then --function end end
Hope this work:
function checkPlayer() for i, v in pairs (game.Players:GetPlayers()) do --loop through all players if not v.BoolValue.Value then --check is the value inside the player is false or not return false -- if it false then return false end end return true -- if every player's value is true then return true end -- the rest of the code goes here