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
 

What's wrong with this script

Previous Thread :: Next Thread 
LordBlanc is not online. LordBlanc
Joined: 13 Dec 2013
Total Posts: 91
11 Apr 2015 07:49 AM
I am scripting game, and i scripted that game can't start unless 3 or more players.

Script:


if game.Players < 2 then
announcer.text = "You need 3 or more players to start!"
else if game.Players > 2 then
announcer.text = "Starting!"


Help please, idk what's wrong, it won't work.


LordBlanc
Report Abuse
ElixSupreme is not online. ElixSupreme
Joined: 01 Jul 2012
Total Posts: 94
11 Apr 2015 08:03 AM
theres a lot of mistakes so.. ill just help you:


announcer = THIS IS WHERE YOU WRITE WHERE IT IS
players = game.Players:GetChildren()

if #players < 2 then
announcer.text = "You need 3 or more players to start!"
else
announcer.text = "Starting!"
end



i think that should work, and obviously you need to change the announcer variabel, if it doesnt work, just give me the error code
Report Abuse
Coolmariodude897 is not online. Coolmariodude897
Joined: 03 Dec 2013
Total Posts: 1819
11 Apr 2015 08:03 AM
This might work
change 'else if game.Players > 2 then'
to if game.Players > 3 then
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
11 Apr 2015 08:07 AM
Don't forget to check that every time a player is added
Report Abuse
LordBlanc is not online. LordBlanc
Joined: 13 Dec 2013
Total Posts: 91
11 Apr 2015 08:08 AM
Thank you Ell. You helped alot. :) It's working now! :D
Report Abuse
Clxver is not online. Clxver
Joined: 19 Oct 2014
Total Posts: 727
11 Apr 2015 08:20 AM
game.Players.NumPlayers*
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