Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

When the last survivor dies the game doesnt restart? (I FOUND IT OUT!!) [closed]

Asked by 4 years ago
Edited 4 years ago

Ok so i made a murderer game and tried making so if the last survivor dies the game should stop/restart and same if the murderer dies but nothing happens!

script :

001wait(1)
002local plrs = game.Players
003local survivors = {}
004 
005while true do
006for i, v in pairs(game.Players:GetChildren()) do
007        --------------o----------------
008        wait(20)
009        --------------o---------------
010 
011        local map = workspace.Maps:GetChildren()[math.random(1, #workspace.Maps:GetChildren())]
012        for i, v in pairs(game.Players:GetChildren()) do
013            if  map.Name == "SpawnZ" then
014                v.Character:MoveTo(workspace.Maps.SpawnZ.Position)
015            elseif map.Name == "SpawnY" then
View all 100 lines...

Locked by T3_MasterGamer, SuperPuiu, and COUNTYL1MITS

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?