generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Can u help me fix this script? mk.

Previous Thread :: Next Thread 
DerpyDerpkins is not online. DerpyDerpkins
Joined: 29 Mar 2015
Total Posts: 1871
09 May 2015 11:16 AM


help me fix the below script, idk whats wrong with it

-------------------------------------------------------

while game.Players.NumPlayers > 2 do
local i = Instance.new('Message', workspace)
i.Text = "You need 2 or more players to play"
wait(10)
i.Parent = nil
end



while game.Players.NumPlayers >= 2 do
(insert round script here)

end

-------------------------------------------------------------



As u can [hopefully] tell, this script makes a message appear if theres only one player in the game that says "You need two or more players to play". But when theres more than 2 players in the game, it begins the round. Please help me fix this script
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
09 May 2015 11:23 AM
'> 2'
should be
< 2



siggys are controverial
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
09 May 2015 11:34 AM
>>As u can [hopefully] tell, this script makes a message appear if theres only one player in the game that says "You need two or more players to play".

No actually it doesn't because you flunked first grade math and didn't learn the difference between less than and greater than.
Report Abuse
DerpyDerpkins is not online. DerpyDerpkins
Joined: 29 Mar 2015
Total Posts: 1871
09 May 2015 12:31 PM
If you havent noticed m8, its less than 2. When thers less than 2 players, it says the message. k bye.
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
09 May 2015 12:35 PM
I just made something like this. Let me help you.

function CountPlayers()
return #game.Players:GetPlayers()
end

local r = 4 --Players Needed to start a game

while true do
--count players
while (CountPlayers() < r) do
msg("Waiting for ".. (r - CountPlayers()) .." more player(s)")
wait(.1)
end
--intermission
for i = 45, 1, -1 do
msg("Game starting in "..i.." second(s)!")
wait(1)
end
--handle game stuff
PlayGame()
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image