Im making a swordfighting game with rounds, and the way it works is at the beginning of each round a vault opens up and the players automatically get moved to fall through it into the map. My issue is that it only affects one player, instead of all the players in the game. Why is this? Here is my code. (This is not the entire script, just a piece of it.)
while true do
wait(30)
local randommap = maps[math.random(1, #maps)]:Clone()
randommap.Parent = game.Workspace
local animator = require(game.Workspace.Vault.Animator)
wait(2)
local children = game.Players:GetChildren()
for _, player in pairs(game.Players:GetPlayers()) do
print("player")
game.ReplicatedStorage.cam:FireAllClients()
wait(0.5)
player.Character.Humanoid.WalkSpeed = 25
player.Character.Humanoid:MoveTo(randommap.Spawn.Position, randommap.Spawn)
animator.OpenVault:Play()
player.Character.Humanoid.MoveToFinished:Wait()
player.Character.Humanoid.WalkSpeed = 16
game.ReplicatedStorage.cam2:FireAllClients()
player.TeamColor = BrickColor.new("Dark blue")
local sword = ss.swords[tostring(player.Inventory.Equipped.Value)]:Clone()
wait(10)
sword.Parent = player.Character
end