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: get amount of players

Previous Thread :: Next Thread 
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
24 Jul 2014 10:13 PM
okay let's say i have a script that puts a value inside of a random amount of players in the game. how do i get how many players has that value?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 10:16 PM
Whats the value called and is it in their Character or PlayerObject
Report Abuse
Foxconn is not online. Foxconn
Joined: 20 Feb 2011
Total Posts: 275
24 Jul 2014 10:18 PM
local playercount = #game.Players
Report Abuse
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
24 Jul 2014 10:18 PM
the value is called value, i call it by its variable which is v
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
24 Jul 2014 10:18 PM
print (Game.Players.NumPlayers)
Report Abuse
Foxconn is not online. Foxconn
Joined: 20 Feb 2011
Total Posts: 275
24 Jul 2014 10:18 PM
oops.

local playercount = #game.Players:GetChildren()
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
24 Jul 2014 10:19 PM
oh ignore what I said
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
24 Jul 2014 10:20 PM
If you guys would read what OP said...

OP, were is the value? PlayerObject or the Character?
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
24 Jul 2014 10:20 PM
valuename = "value name here";

dir = game.Players:GetPlayers();
has = {}
for i=1,#dir,1 do
if(dir[i]:FindFirstChild(valuename, true)) then
table.insert(has, dir[i])
end
end
Report Abuse
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
24 Jul 2014 10:22 PM
ugh i have a really big script and once i start to right too much, i don't even know what i'm doing anymore >->
Report Abuse
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
24 Jul 2014 10:24 PM
okay so i have a game script that teleports you to the map, i don't know what to do when all the players die from the map
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
24 Jul 2014 10:24 PM
lol, i just love how i used semicolons in part of it, but left it out for teh rest.

this is a signature: pcall(function() print([[apparently this is a string]]) end)
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