How would I move all players in the games characters?

How would I move all players in the games characters?

local players = game.Players:GetPlayers()
for i, player in pairs(players) do
    local character = player.Character or player.CharacterAdded:Wait()
    character:MoveTo(position)
end
1 Like

I don’t really get it what you’re trying to achieve here.
Do you mean how to move every player to a position?

If so, how you can achieve that is getting every single player in a for i, v loop:

local myPosition = Vector3.new(0, 10, 0) -- change this to a part's position
for _, player in ipairs(game.Players:GetPlayers()) do
	if player.Character then
		local char = player.Character
		local torso = char.Torso -- change this if you're using R15
		torso.CFrame = CFrame.new(myPosition)
	end
end

(Not tested the code)

1 Like