GetPlayers (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
example
>Camoy
No edit summary
Line 1: Line 1:
<onlyinclude>{{Method|name = GetPlayers
<onlyinclude>{{Method
|arguments =
|name = GetPlayers  
|returns = [[Table]] ''list of players''
|returns = [[Table]] ''list of players''
|description = Gives you a table containing all the players in the server.
|description = Gives you a table containing all the players in the server.
Line 6: Line 6:
}}</onlyinclude>
}}</onlyinclude>


 
{{clear floats}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 


{{Example|<pre>
{{Example|<pre>
Line 29: Line 15:
end
end
</pre>}}
</pre>}}
[[Category:Methods]]
[[Category:Methods]]

Revision as of 13:52, 31 December 2010

GetPlayers( )
Returns Table list of players
Description: Gives you a table containing all the players in the server.
Member of: Players


Example
local players = game.Players:GetPlayers()

for i = 1, #players do
   players[i].Character:MoveTo( Vector3.new( 0, 50, 0 ) )
end