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 » Scripting Helpers
Home Search
 

Re: Delete GUI After 3 Players In Game

Previous Thread :: Next Thread 
Bubu2319 is not online. Bubu2319
Joined: 06 Aug 2011
Total Posts: 1006
26 Sep 2014 11:38 AM
while true do
wait(0.2)
if game.Players.NumPlayers == 1 then
script.Parent.Text = "There is " ..game.Players.NumPlayers.. " player online 2 more needed to play"
else
if game.Players.NumPlayers == 2 then
script.Parent.Text = "There are " ..game.Players.NumPlayers.. " players online 1 more needed to play"
else
(I NEED TO DELETE THE GUI IF THERE IS 3 PLAYERS AND BRING IT BACK IF A PLAYER LEAVES AND THERE ISNT MORE THAN 3)
end
end
end
Report Abuse
Bobobob12 is not online. Bobobob12
Joined: 23 Jan 2008
Total Posts: 5350
26 Sep 2014 11:44 AM
game.Players.PlayerAdded:connect(function()
if game.Players.NumPlayers > 2 then
script.Parent.Visible = false;
end;
end);

game.Players.PlayerRemoving:connect(function()
if game.Players.NumPlayers <= 2 then
script.Parent.Visible = true;
script.Parent.Text = "There are " .. game.Players.NumPlayers .. " players online. " .. 3 - game.Players.NumPlayers .. " more needed to play!";
end;
end);
Report Abuse
Bubu2319 is not online. Bubu2319
Joined: 06 Aug 2011
Total Posts: 1006
26 Sep 2014 11:46 AM
Thanks man
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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