local oldMessage = ""
local minPlayers = 2
function teleportAllPlayers()
local target = CFrame.new(workspace.TeleportTarget.Position)
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
player.Playing.Value = 1
--add an offset of 5 for each character
end
end
function message(message)
if oldMessage ~= message then
oldMessage = message
print(message)
end
end
function playersCurrentlyPlaying()
for i, player in ipairs(game.Players:GetChildren()) do
if player.Playing.Value == 1 then return true end
end
return false
end
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
player.Playing.Value = 0
end)
end)
local playing = Instance.new("IntValue", player)
playing.Value = 0
playing.Name = "Playing"
end)
while(true) do
wait(10)
if #game.Players:getPlayers() >= minPlayers then
if playersCurrentlyPlaying() then
message("Waiting for the current game to end...")
else
message("There are enough players for a new game! Teleporting...")
wait(4)
teleportAllPlayers()
end
else message("Waiting for more players...") end
end
This is what i have so far it teleports the players in but i need to find a way to make it so that it teleports the survivor back when theyre the last alive, And also i need a way to make it so that it prints who won and When the game is currently going if anyone can edit this script or tell me where and what to add or even has a script for a battle royale that will already do what i said that'd be really helpful and id appreciate it thanks. Also Need to find a way to make it reset the map when the games over

3 comments
Do i put the maps in server storage? do they need to be called a certain thing and Can i choose where they spawn?
That is just the script I use, you can always just tweak it to what you are using in your game. For example you can switch the map variables to look in game.Lighting.
Curious i used a terrain for my maps base cause i thought the new one looked more realistic how could i get it to include that with the map?