Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

ZOMBIE GAME ROUND SCRIPT???

This is a script that is supposed to pick 3 random zombies out of the players and create 2 team called zombies and humans and pick a random map from 1 map in ServerStorage then put it in workspace and teleport everyone to that map.

EXCEPT the script only creates the human team then errors and doesnt execute the rest Am i doing something wrong?? Is there a simpler/easier way to do this?? Please help anything is great thanks!!!

Here is the script

local h  = Instance.new("Hint")
local findMaps = game.ServerStorage["Maps"]:GetChildren()
local map = findMaps[math.random(1,2)]

h.Text = map.Name.."has been chosen!"
m = map.Clone()
m.Parent = game.Workspace
local Plrs = game.Players:GetPlayers()
local killer = Plrs[math.random(1,#Players)]
 
for i,v in pairs(game.Players:GetChildren()) do
    if v:findFirstChild("Character") then
        v.Character.Torso:MoveTo(188.155, 29.2, -203.112)
    end


end

1 comment

0

Please do not use caps in your title. There is no need for it. Thanks!

1 answer

local h  = Instance.new("Hint")
local findMaps = game.ServerStorage.Maps:GetChildren()
local map = findMaps[math.random(1,2)]

h.Text = map.Name.."has been chosen!"
m = map:Clone()
m.Parent = game.Workspace
local Plrs = game.Players:GetPlayers()
local killer = Plrs[math.random(1,#Players)]
for i,v in pairs(game.Players:GetChildren()) do
    if v.Character ~= nil then
        v.Character.Torso:MoveTo(Vector3.new(188.155, 29.2, -203.112))
    end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.