GetPlayers (Method)

From Legacy Roblox Wiki
Revision as of 02:07, 20 March 2012 by >JulienDethurens
Jump to navigationJump to search
GetPlayers( )
Returns table
Description: Returns a table containing all the players in the server.
Member of: Players


Example

This code would move every player to the position

0
50
0

.

for _, player in pairs(game.Players:GetPlayers()) do
	if player.Character then
		player.Character:MoveTo(Vector3.new(0, 50, 0))
	end
end