This topic is closed

This topic is closed

You could store them in a table like so:

You could store them in a table like so:

local players = {}

for _, player in pairs(game.Players:GetPlayers()) do
	if not player.PrivateStats.AFK.Value then
		table.insert(players, player)
	end
end

The “players” table now contains a list of all player objects whos AFK value is false

I’m slightly confused. Does the code that you provided not work?

No i just posted an example i didn’t try it and i’m pretty sure it doesn’t

Oh wait I read your first message wrong, sorry. @thetacah’s solution should work

Ok thanks i’ll let u know after i try it