of     1   

C_Sharper
#126284660Thursday, February 20, 2014 8:38 PM GMT

local minigames = {} local h = Instance.new("Hint",game.Workspace) while true do wait() if game.Players.NumPlayers >= 1 then wait(95555) h.Text = "Enough players! Starting game.." else h.Text = "We need one more player to start." end end I am testing it in studio, the "else" will not work, but it did when I ran it by clicking on the green arrow.
ThomasChabot
#126284813Thursday, February 20, 2014 8:40 PM GMT

Where are you running it from? If its not edit mode, then that if will never be false, so that else will never run; try changing >= 1 to >= 2 in the if mmm cats
jd678
#126284854Thursday, February 20, 2014 8:40 PM GMT

" >= 1 " you are checking if there are 1 or more players, so there would have to be 0 players for the 'else' to fire. change it to ' > 1 '
C_Sharper
#126284882Thursday, February 20, 2014 8:40 PM GMT

I figured it out, "else" was listed under the function, it should have been under the end. Thanks though
DaMrNelson
#126284983Thursday, February 20, 2014 8:42 PM GMT

Oh god... why do you have 12 straight lines of blank space? D: Anywho, your problem is that IF there's enough players, the game waits 1 day, 2 hours and 24 minutes (if my math is right). Try making that number lower. If that doesn't work, post your output? Also, just to confirm, the intention of this script (so far) is to make a message say if there's 1 *OR* more players in the game, right? Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
C_Sharper
#126284984Thursday, February 20, 2014 8:42 PM GMT

No, it says it needs another end. Bump
jd678
#126285013Thursday, February 20, 2014 8:42 PM GMT

still won't work unless you change the if, unless you have a game with 0 players in it
C_Sharper
#126285087Thursday, February 20, 2014 8:43 PM GMT

This is insane, you guys arn't listening to me. The first part works. It is with the "else" statement. It will not say "Needs another player" Look below the script
C_Sharper
#126285201Thursday, February 20, 2014 8:44 PM GMT

Oh gosh, lost my brain for a sec there. You were right. It was with the timing. Much appreicated
ThomasChabot
#126285202Thursday, February 20, 2014 8:44 PM GMT

Scripts can deceive you. The problem can appear to be in one part, yet be in a completely different part. The reason the else will not fire is because the if cannot be false. Change it to > 1 and it will work. mmm cats
DaMrNelson
#126285215Thursday, February 20, 2014 8:44 PM GMT

Read my post before complaining about us not reading yours. I told you the reason its not working, its checking if there's 1 or more players (which there probably will be, if you're testing it), then waiting over a day (meaning that you don't go back to the if statement again for a whole day). Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
C_Sharper
#126285324Thursday, February 20, 2014 8:46 PM GMT

The player num wasn't causing it. It was the "wait"
jd678
#126285335Thursday, February 20, 2014 8:46 PM GMT

It's exactly what L2k said. the if is always true, so the else CANNOT FIRE unless the if is FALSE You have it set to >=1 when it needs to be > 1
jd678
#126285399Thursday, February 20, 2014 8:47 PM GMT

the wait has nothing to do with the else.
C_Sharper
#126285449Thursday, February 20, 2014 8:47 PM GMT

We can keep going on about this, it was the wait that caused it. it doesn't make much sense, but It worked when I changed it to 5.
DaMrNelson
#126285487Thursday, February 20, 2014 8:48 PM GMT

@jd678 The wait has everything to do with his script not working. When he plays, there is automatically somebody in the game (which I'm assuming is how he's testing). Because there is somebody there, the script waits over a day before checking the if statement again. Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
jd678
#126285714Thursday, February 20, 2014 8:51 PM GMT

Yes, but if he changed the if to > 1 then it will only fire the if when there are 2 or more players. His game only needs 1 player to start? Then whats the point in checking for players, it's totally worthless.
C_Sharper
#126285770Thursday, February 20, 2014 8:51 PM GMT

I was just testing it! Early testing...
jd678
#126285869Thursday, February 20, 2014 8:53 PM GMT

repeat wait() until game.Players.NumPlayers >= 1 does EXACTLY what his script does, except it doesn't infinitely loop when a player is found
jd678
#126286034Thursday, February 20, 2014 8:55 PM GMT

You can test things with players by following these steps: Tools > Test > Start Server --With the Server Tab selected Tools > Test > Start Player you can control each player, and access scripts through the server-client
jd678
#126286196Thursday, February 20, 2014 8:56 PM GMT

repeat wait(1) print("Not enough Players") until game.Players.NumPlayers > 1 wait(5) print("Game Starting!") --is a bit more efficient btw.
C_Sharper
#126286465Thursday, February 20, 2014 8:59 PM GMT

Thanks. But I like using loops. It just seems faster to type.
jd678
#126286748Thursday, February 20, 2014 9:03 PM GMT

yours is fine, sorry about the confusion.
C_Sharper
#126287412Thursday, February 20, 2014 9:10 PM GMT

Ty :)

    of     1