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

How do I add a kill all players to this script?

Asked by 7 years ago
Edited 7 years ago

This was a free model I took from the toolbox this is the script from it, can you tell me how to kill all the players when the round ends? :/

local tvalue = script.Parent.StatusTag --Setting the variable for 'StatusTag'

function beginGame()
    for i = 120, 0, -1 do 
        wait(1)
        tvalue.Text = "Intermission: " .. i .. "" --Changing Text 1
        if i == 0 then
            tvalue.Text = "Game Started!" --Changing Text 2
        local target = CFrame.new(24, 22.5, -50) 
for i, player in ipairs(game.Players:GetChildren()) do --Finding all players
   if player.Character and player.Character:FindFirstChild("Torso") then 
      player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) 
   end
end
        end --Ends
    end
end

if game.Players.NumPlayers > 1 then 
    beginGame()
else
    tvalue.Text = "Needs 2 or more player(s) to begin."
end
0
Use Code Blocks so that others can understand your code. FiredDusk 1466 — 7y
0
To make a code block, select your code and click that lua icon when editing your question. FiredDusk 1466 — 7y
0
there, I fixed it. :) monstererupter -10 — 7y
0
Also, I made a minigames tutorial on youtube (on my alt channel). If you would like to check it out, search "iPreviized" on youtube. FiredDusk 1466 — 7y
0
Thanks. :D monstererupter -10 — 7y

Answer this question