Here's my code
for i,v in next, game:GetService("Players"):GetChildren() do
print(v)
end
Let's say there are 6 players in my game, how could only print 1-2, or half of the players?
Here's my code
for i,v in next, game:GetService("Players"):GetChildren() do
print(v)
end
Let's say there are 6 players in my game, how could only print 1-2, or half of the players?
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
local timestoloop = math.floor(#game:GetService("Players"):GetPlayers() / 2)
this should return the half of the number of players, being rounded to the lowest whole if it's not a whole number