So When Game Starts, Players all teleport To Game Place, I want to do a sword game, So When someone of players die, They all teleport to their own podium and starting again until last man standing, help pls!
COMMUNITY QUESTION
How To Insert All Players In Tables?
2 answers
That's fairly easy.
local playerservice = game:service'Players'
local players = {} --// let's create a table to store the players in
function get_players()
players = {} --// clears the table
for _, a in pairs(playerservice:players()) do --// gets all the players
table.insert(players, a.Name) --// inserts them to the table
end
end
Now, when you want to get the players and store them inside the table just do:
get_players()
This should work and if it does help you, accept my answer. Thanks :)
local Players = game.Players:GetPlayers()
This will create a table of all the players currently in the game and you can do whatever you want with them.
2 comments
0
uh no.. that will just get the service lol
1
Whoops
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
give it a go
I Don't Even Know How To Start