Im Trying to Check to See if a players AFK Tag is false or true. It Does not remove then from the table but the IntroTag One removes/adds though.
local plrs = {}
for i, player in pairs (game.Players:GetPlayers()) do
if player.IntroTag.Value == false or player.AFK.Value == false then
table.insert(plrs,player)--Add each players into plrs table
print(player)
elseif player.IntroTag.Value == true or player.AFK.Value == true then
warn(player, 'has Been Removed From Table - Intro Or AFK.')
for i = 1, #plrs do
if plrs[1] == Player then
table.remove(plrs,i) --Remove Player from table if they are in the intro or AFK.
It looks like you might mean to use and and not or. The player can be added to the plrs table if they are AFK but not Intro, and they can also be added if they’re not Intro but they are AFK. If they are one of those then you want to run the second branch in the if statement, but if they’re not one of those then the first branch will run. Switching the order of the two branches would have the same effect.
local plrs = {}
for i, player in pairs (game.Players:GetPlayers()) do
if not (player.IntroTag.Value and player.AFK.Value) then
table.insert(plrs,player)--Add each players into plrs table
print(player)
else
warn(player, 'has Been Removed From Table - Intro Or AFK.')
for i = 1, #plrs do
if plrs[1] == Player then
table.remove(plrs,i) --Remove Player from table if they are in the intro or AFK.