if #plrs == 1 then
-- Last person standing
Status.Value = "The winner is "..plrs[1].Name
plrs[1].leaderstat.Bits.Value = plrs[1].leaderstats.Bits.Value + 25
break
I’m not sure which part of the code doesn’t teleport the player that won back to the lobby…
for i, player in pairs(game.Players:GetPlayers()) do
character = player.Character
if not character then
-- Ignore them
else
if character:FindFirstChild("GameTag") then
character.GameTag:Destroy()
end
if player.Backpack:FindFirstChild("Sword") then
player.Backpack.Sword:Destroy()
end
if character:FindFirstChild("Sword") then
character.Sword:Destroy()
end
player:LoadCharacter()
end
end
ClonedMap:Destroy()
Status.Value = "Game over!"
wait(2)
end
This might be the code of how it teleports the players back to the lobby.
if character:FindFirstChild("GameTag") then
character.GameTag:Destroy()
end
if player.Backpack:FindFirstChild("Sword") then
player.Backpack.Sword:Destroy()
end
if character:FindFirstChild("Sword") then
character.Sword:Destroy()
end
my suspicions is that you have two tools which I think may be called “Sword” which may be the case why the tools didn’t delete in the first place and throw an error.