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

how do u make things (e.g a zombie) spawn repetitively?

Asked by 4 years ago

umm i dont know how to script im bad at it and i dont know how it works please help

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Just clone the model to your desired location. For example you can spawn an NPC at 0, 0, 0. To do this, insert this script below in ServerScriptService. But, since it's a model, you want to position it, you would do this: (Make sure to set the PrimaryPart of the NPC's Model to anything inside of it)

local NPC = game.Workspace.Zombie

while true do
    wait(10) --Wait 10 seconds to spawn in a new NPC
    local clone = NPC:Clone()
    clone.Parent = game.Workspace
    clone:SetPrimaryPartCFrame(CFrame.new(0,0,0))
end
Ad

Answer this question