I am trying to make a script that creates a table of players who step on a platform and teleports all of their HumanoidRootParts to the game area, and I've been having trouble checking if enough players stepped on the platform. I tried to use:

		local PTCount = 0
		for i, v in pairs do(PlayerCount:GetChildren())
			PTCount = PTCount + 1
		end
		
		if PTCount <= 1 then
			Status.Value = "We need more players to get on platform"
		end

But it was putting red error lines under the "GetChildren()", and that's the only way I know to get children from something. I looked up devforum posts and all I could find were about getting children from an instance or questions unanswered. Is there a way to find all the children from a table?

1 comment

0

#PlayerCount:GetPlayers()