After the limit it stopped respawning Please help
zombie = script.Parent.Parent["Normal Zombie"] zombiebackup = zombie:Clone() zombie:Destroy() --use Destroy instead of remove local limit = 3 --change to edit limit for i = 1,limit do wait(5) local newzombie = zombiebackup:Clone() newzombie.Parent = game.Workspace newzombie:MakeJoints() newzombie.Torso.CFrame = script.Parent.CFrame + Vector3.new(0, 5, 0) newzombie:MakeJoints() zombie = newzombie zombiebackup = zombie:Clone() end
Obviously it stopped! You made the script so that they stop respawning after 3 zombies! Your script is working perfectly! Anyway, if you want the zombies to continously respawn with no limit, I modified the script:
zombie = script.Parent.Parent["Normal Zombie"] zombiebackup = zombie:Clone() zombie:Destroy() --use Destroy instead of remove --I deleted the limit so that a zombie continously spawns every 5 seconds. while true do wait(5) -- You can change the 5 to any number you want. Every 5 seconds a zombie will spawn. local newzombie = zombiebackup:Clone() newzombie.Parent = game.Workspace newzombie:MakeJoints() newzombie.Torso.CFrame = script.Parent.CFrame + Vector3.new(0, 5, 0) newzombie:MakeJoints() zombie = newzombie zombiebackup = zombie:Clone() end