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
|
  |
| 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
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 24 Jul 2014 10:18 PM |
| local playercount = #game.Players |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 24 Jul 2014 10:18 PM |
| print (Game.Players.NumPlayers) |
|
|
| Report Abuse |
|
|
Foxconn
|
  |
| Joined: 20 Feb 2011 |
| Total Posts: 275 |
|
|
| 24 Jul 2014 10:18 PM |
oops.
local playercount = #game.Players:GetChildren() |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|