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: How would I..

Previous Thread :: Next Thread 
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
11 Apr 2012 04:59 PM
Basically Reset the server? I need to find all the players and Delete all their tools.. and Need to change a few items in the PLayer. How could i get every player in the Players tab?

~Working towards that PSTF..~
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
11 Apr 2012 05:01 PM
for i,player in pairs(Game.Players:GetPlayers())
print(player.Name)
end
Report Abuse
DrAwsomeMonkey is not online. DrAwsomeMonkey
Joined: 22 Aug 2011
Total Posts: 15766
11 Apr 2012 05:02 PM
Explain, if you want to reset the server you could always click "Shutdown" :3
Report Abuse
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
11 Apr 2012 05:05 PM
@MrNicNac
How would I implicate that so that i could go into the player's backpack or PlayerGui or something? would it be

i.Backpack.Tool?

~Working towards that PSTF..~
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
11 Apr 2012 05:06 PM
.........No......

*in the for loop*

table.foreach(player.Backpack:GetChildren(), function(i,v) v:Destroy() end)
Report Abuse
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
11 Apr 2012 05:07 PM
Ok, thanks

~Working towards that PSTF..~
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
11 Apr 2012 05:14 PM
"table.foreach(player.Backpack:GetChildren(), function(i,v) v:Destroy() end)"

Why does the wiki told us this:
"This item is deprecated; use the pairs() function instead!"
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
11 Apr 2012 05:15 PM
Yes, it's deprecated, but I used it anyways to avoid more looping confusing - obviously he's a bit new to the generic for loops.
Report Abuse
callmeduck2 is not online. callmeduck2
Joined: 18 Jan 2010
Total Posts: 2804
11 Apr 2012 05:19 PM
Im not good with 'for i,v in pairs' and tables.

~Working towards that PSTF..~
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
11 Apr 2012 05:22 PM
Learn the 'for loop' first.
It will help you with the pairs() function and stuff.
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