As the title says, I have a script that tries to have the amount of true variables in a count but it isn't working. I also have another script that is laid out the exact same way for another variable and that one works.
There also isn't an error.
wait(10)
_G.playersInGame = 0
local players = game.Players
for I, v in pairs(players:GetChildren()) do
wait(.01)
if v:WaitForChild("Backpack").isntOut.Value == true then
_G.playersInGame = _G.playersInGame + 1
end
_G.playersInGame = 0
end

3 comments
I just tried doing it with a value object and it also didn't work.
DId you remove the line "playersInGame = 0" following the if statement? That's the only reason the code wouldn't count correctly.
Yeah, still nothing happens.