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: Script that makes a list of all in game players

Previous Thread :: Next Thread 
jonathan1q2w3e4r is not online. jonathan1q2w3e4r
Joined: 27 Oct 2011
Total Posts: 179
16 Jan 2017 03:03 PM
Says it in title.
Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
16 Jan 2017 03:04 PM
game.Players:GetPlayers()
Report Abuse
pketny is not online. pketny
Joined: 27 Dec 2010
Total Posts: 1162
16 Jan 2017 03:04 PM
http://wiki.roblox.com/index.php?title=API:Class/Players/GetPlayers

returns a table of all players currently in the lobby
Report Abuse
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
16 Jan 2017 03:04 PM
local p = game.Players:GetPlayers()???
Report Abuse
TwistyTies is online. TwistyTies
Joined: 17 Sep 2010
Total Posts: 2577
16 Jan 2017 03:05 PM
local PlayerList = {}

for i, v in pairs(game.Players:GetPlayers()) do
PlayerList[v] = v
end

game.Players.PlayerAdded:connect(function(plr)
PlayerList[plr] = plr
end)

game.Players.PlayerRemoving:connect(function(plr)
if (PlayerList[plr]) then
PlayerList[plr] = nil
end
end)


If money grew on trees... It would be as valuable as leaves. | Twitter: @TwisterRBLX
Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
16 Jan 2017 03:07 PM
don't ever do twisty's example
Report Abuse
pketny is not online. pketny
Joined: 27 Dec 2010
Total Posts: 1162
16 Jan 2017 03:08 PM
PlayerList[plr] = plr

Lol?
Report Abuse
lskid is online. lskid
Joined: 07 Dec 2012
Total Posts: 89
16 Jan 2017 03:15 PM
game.Players:GetChildren() will return a table of all players in the game.


Lskid
Report Abuse
pketny is not online. pketny
Joined: 27 Dec 2010
Total Posts: 1162
16 Jan 2017 03:17 PM
game.Players:GetChildren()

Players:GetChildren()

GetChildren()

Children


TRIGGERED
Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
16 Jan 2017 03:17 PM
lol
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