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

Help me with this script?

I'm trying to test if there is 2 or more players why won't it work?

while true do
F = Game.Players.NumPlayers
wait(.1)
end

while true do
if F = 2 then
	
	end
end

1 comment

0

The first loop never ends because the condition will always be true. Try having only one while loop with both parts in them.

1 answer

✓ Accepted answer
while true do
wait(.1)
	if Game.Players.NumPlayers =< 2 then
		-- code here
	else
		print("Not enough Player")
	end
end

There. :D

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