Would this?
local p = game.Players:GetPlayers()
for i = 1, #p do
Work for this?
for i,v in pairs(game.Players:GetPlayers()) do
v:MoveTo(Vector3.new(75.4, 326.9, -469.7))
Would this?
local p = game.Players:GetPlayers()
for i = 1, #p do
Work for this?
for i,v in pairs(game.Players:GetPlayers()) do
v:MoveTo(Vector3.new(75.4, 326.9, -469.7))
No, it wouldn't. i points to the index of the player, but you can't get instances by the index number. You will have to use for i,v pairs(game.Players:GetPlayers()) do.
EDIT: After some further research, I realized it actually is possible to make them work together:
p[i] is the same in the first script as v is in the second script.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
How would I make it so the 2 could work together?
See my edited answer.