Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How Do I Make A Script That Will Find The Player Amount From A StringValue?

1 answer

*To turn "Players" into an integer (Number) value instead of a table/array you put a "#" in-front

so if:*

Players = game.Players:GetChildren() -- This is the total ammount of players
"print(Players)"

Output: "AnAnonymousDeveloper, JamieTheGreatQ777"

Players = game.Players:GetChildren() -- This is the total ammount of players
"print(#Players)"

Output: "2"

So you could have it as:

Players = game.Players:GetChildren() -- This is the total ammount of players

if #Players >= 2 then
	GameCanStart = true
end

Hope This Helps! ~ AnAnonymousDeveloper

This discussion is preserved as it was. New answers, comments, and votes are closed.