I'm having a problem with the teleporting of my game. The problem is that the players spawn on the same place even though I "Table.Remove" the previous one. Here is the script:
if Status.Value == "Started" then
for y, player in pairs(plrs) do
local spawnPoints = game.Workspace.DanceStudioInside:FindFirstChild("SpawnDanceStudioDance")
local AvailableSpawnPoints = spawnPoints:GetChildren()
local char = player.Character or player.CharacterAdded:Wait()
if player then
if char then
char:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame
table.remove(AvailableSpawnPoints, 1)
else
if not player then
table.remove(plrs, y)
end
end
end
end
