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: How do you make an elimination round?

Previous Thread :: Next Thread 
GIassWindows is not online. GIassWindows
Joined: 03 Oct 2016
Total Posts: 285
30 Apr 2017 08:47 AM
Say like there are 4 players,the last person standing wins.
How do I make that?


ok
Report Abuse
Rice_Nice is not online. Rice_Nice
Joined: 12 Mar 2017
Total Posts: 166
30 Apr 2017 08:51 AM
Make a table holding the names of the players in the round. Then use the Humanoid.Died event to first remove the corresponding player from the table, and second check if only one player is still standing (length of that table == 1).
Report Abuse
GIassWindows is not online. GIassWindows
Joined: 03 Oct 2016
Total Posts: 285
30 Apr 2017 08:59 AM
to hold their names i have to make a for loop right?


ok
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
30 Apr 2017 10:18 AM
local PlayersTable = {}

game.Players.PlayerAdded:Connect(function(Player)
PlayersTable[#PlayersTable + 1] = Player
Player.CharacterAdded:Connect(function(Character)
Character:WaitForChild("Humanoid").Died:Connect(function()
-- Remove from table then check the length of the table if it equals 1
end
end)
end)

game.Players.PlayerRemoving:Connect(function(Player)
for i = 1,#PlayersTable do
if PlayersTable[i] == Player then
table.remove(PlayersTable,i)
break
end
end
end)

Report Abuse
GIassWindows is not online. GIassWindows
Joined: 03 Oct 2016
Total Posts: 285
30 Apr 2017 10:35 AM
Thanks! I'll try this out.


ok
Report Abuse
GIassWindows is not online. GIassWindows
Joined: 03 Oct 2016
Total Posts: 285
01 May 2017 04:06 AM
b


ok
Report Abuse
Rice_Nice is not online. Rice_Nice
Joined: 12 Mar 2017
Total Posts: 166
01 May 2017 05:56 AM
What's the problem?
Report Abuse
GIassWindows is not online. GIassWindows
Joined: 03 Oct 2016
Total Posts: 285
01 May 2017 06:04 AM
everything :(((((((((((((((((((


ok
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