I tried to solve it this way. (Yes, that's how stupid I am) It's for a duel game that's why I just used Humanoid.Died instead of detecting the number of players alive. (I actually don't know how to) Please help, thank you! <3
local map1 = game.ServerStorage.Maps.Map1
local map2 = game.ServerStorage.Maps.Map2
map1:Clone().Parent = game.Workspace
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
while true do
character:WaitForChild("Humanoid").Died:Connect(function()
print("tanga")
game.Workspace.Map1:Remove()
map2:Clone().Parent = game.Workspace
end)
character:WaitForChild("Humanoid").Died:Connect(function()
print("tanga")
game.Workspace.Map2:Remove()
map1:Clone().Parent = game.Workspace
end)
end
end)
end)
