Now, as the title says, one of my round scripts that I have isn't working. It keeps saying "Teleporting players..." and only teleports one player and doesn't activate the round. The game: (it relies on gui so i think this is helpful) https://drive.google.com/file/d/1h9r_U9doFcIJqAjVF-KxEZr4V5wdOCm3/view?usp=sharing

Script:

local settings = game.ReplicatedStorage.Settings

function intermission()
settings.running.music.Value = false
repeat wait() settings.msg.Value = settings.players.Value.." or more players are needed to play. Invite some friends!" until game.Players.NumPlayers >= settings.players.Value
for i = 1,math.floor(settings.intermission.Value) do
settings.msg.Value = settings.intermission.Value - i.." seconds until "..settings.title.Value.." begins!"
wait(1)
end
if game.Players.NumPlayers >= settings.players.Value then
thegame()
else
settings.msg.Value = "Oh no! There are not enough players anymore :("
wait(2)
intermission()
end
end

function thegame()
settings.msg.Value = "Welcome to "..settings.title.Value.."!"
wait(2)
settings.msg.Value = "Teleporting players..."
settings.running.music.Value = true
settings.running.Value = true
p = game.Players:GetChildren()
for i = 1,#p do
if p[i].Character then
p[i].Character:MoveTo(settings.position.Value)
wep = settings.weapons:GetChildren()
for ii = 1,#wep do
wep[ii]:Clone().Parent = p[i].Backpack
end
wait()
end
end
for i = 1,math.floor(settings.gametime.Value) do
settings.msg.Value = settings.gametime.Value - i.." seconds remaining."
wait(1)
end
p = game.Players:GetChildren()
for i = 1,#p do
bp = p[i].Backpack:GetChildren()
for ii = 1,#bp do
bp[ii]:remove()
end
end
settings.msg.Value = "Times up!"
settings.running.Value = false
wait(1)
settings.msg.Value = "Teleporting players to lobby.."
p = game.Players:GetChildren()
for i = 1,#p do
if p[i].Character then
p[i].Character:MoveTo(settings.lobby.Value)
end
end
wait()
intermission()
end


game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
if settings.running.Value == true and settings.respawn.Value == true then
c:MoveTo(settings.position.Value)
wep = settings.weapons:GetChildren()
for ii = 1,#wep do
wep[ii]:Clone().Parent = p.Backpack
end
end
end)
end)

intermission()

4 comments

0

u do realise that u just gave ur entire game away in that link

0

u forgot to close the damn function at line 19

0

i really couldn't care less since the game is literal trash

0

can i get an explanation though..?