local rs = game:GetService('ReplicatedStorage')
local entities = rs:WaitForChild('Entities')
local zombie = entities.Zombies:WaitForChild('Zombie')
local zombieFast = entities.Zombies:WaitForChild('Fast Zombie')
local randomNumber = math.random(1,50)
if randomNumber == 1 then
local clone = zombie:Clone()
clone.Parent = workspace:WaitForChild('Zombies')
clone.HumanoidRootPart.CFrame = CFrame.new(math.random(-125, 125), 15, math.random(-125, 125))
elseif randomNumber == 2 then
local cloneFast = zombieFast:Clone()
cloneFast.Parent = workspace:WaitForChild('Zombies')
cloneFast.HumanoidRootPart.CFrame = CFrame.new(math.random(-125, 125), 15, math.random(-125, 125))
end
So on and so forth what I'm saying is this will take a while to do for each individual zombie and I was just wondering if there was a way to make this shorter?

1 comment
You can use a function for spawning zombies. Like this SpawnZombie(ZombieType)