How to detect how many players in a server?

Every time you create dialog get player count by doing this:

#(game.Players:GetChildren())

if you want this as function, to reuse, then do this:

function getPlayerCount()
	return #(game.Players:GetChildren())
end
2 Likes