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

If there were more than two players would this script run?

I was wondering if this would run the script if there is more than two players in the game

if game.Players.NumPlayers == 2 then

----rest of script
end

if it does not run if there are more than two players, Is there a way to make it to where it's like Two or More?

3 answers

✓ Accepted answer
if game.Players.NumPlayers >= 2 then --if there are at least two players (two or more) do this
	--code
end

You can use ==, >= <=, >, <, and ~=. They compare "are equal to", "greater then or equal to", "less than or equal to", "greater than", "less than", and "are not equal to", respectively.

pretty sure it wouldn't work with more than two. I think to make it work with more than two it would be ~~~~~~~~~~~~~~~~~ if game.Players.NumPlayers >= 2 then -- rest of script end

if not then try switching >= to =<. If that doesn't work then Idk what to do

Do

if game.Players.NumPlayers >= 2 then
---- rest of script
end

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