I'm making a Alien that when you kill it, it spawns aliens. But the aliens that spawn don't teleport to the Alien that died any help???
TorsoPos = script.Parent.Torso.Position
SpizerMob = game.Lighting.Spizer
SpizerCount = math.random(1,4)
function SpizerSpawn()
SpizerMob:clone().Parent = workspace
wait(1)
SpizerMob.Torso.Position = Vector3.new(TorsoPos)
end
while wait(1) do
if script.Parent.Alien.Health < 1 then
if SpizerCount == 1 then
SpizerSpawn()
elseif SpizerCount == 2 then
SpizerSpawn()
SpizerSpawn()
elseif SpizerCount == 3 then
SpizerSpawn()
SpizerSpawn()
SpizerSpawn()
elseif SpizerCount == 4 then
SpizerSpawn()
SpizerSpawn()
SpizerSpawn()
SpizerSpawn()
wait(1)
end
end
end

1 comment
It works but there is one problem the "Spizer" dies when it gets spawned and the first "Spizer" that spawns spawns in a random place :/