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

What do I do after the zombies reached the limit?

Asked by 6 years ago

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 


0
I killed 3 of the zombies and it stopped respawning WTFITSAHACKER -5 — 6y
0
Your script runs through a loop 3 times, your set "limit, waiting 5 seconds between spawning each zombie. What else do you want it to do? Jellyfosh 125 — 6y

1 answer

Log in to vote
0
Answered by
Aimarekin 345 Moderation Voter
6 years ago

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 



0
If you want a different thing to happen after the limit, please explain better what do you want to do! Aimarekin 345 — 6y
0
If you want a different thing to happen after the limit, please explain better what do you want to do! Aimarekin 345 — 6y
0
I want the limit still there,basically just like 3 zombies in 1 map till some players killed 1 zombie then another zombie will spawn in,just the limit is 3 zombie WTFITSAHACKER -5 — 6y
0
Ok, then I think you're asking for too much. Scripting helpers is NOT a request site. I mean, Scripting helpers is not for asking others to script for you. It's against the rules. If you want to make a zombie game, learn to code. Sorry, but I'm not helping with making an entire code. Aimarekin 345 — 6y
View all comments (2 more)
0
I'm explaining not "requesting" lmao WTFITSAHACKER -5 — 6y
Ad

Answer this question