I would like this so I could change the time that it takes for a zombie to respawn. the code:
local 2 = script.Parent.respawn_time -- respawn_time is the number value robo=script.Parent:clone()
while true do
wait(1) -- how do i change this to the number value?? if i do script.parent.respawn_time it
-- wont work because it has to be a number
robo.Parent = workspace
robo.HumanoidRootPart = Vector3.new(-292.325, -89.822, -496.78)
robo.Script:Destroy()
end
please help also if you know another way to use wait like idk another thing pls help
Sorry I wanted to write an answer not a comment.
I am guessing you want to do this
local time = script.Parent.respawn_time while wait(time) do robo=script.Parent:clone() robo.Parent = game.Workspace -- just to make sure it spawns in workspace end
This should work but if you put the time and script in the robo then when it clones the robo it also clones the scripts and it will go on until you regret running the command
I will try to explain how to make a spawner as good as I can
Step 1: Make a part and put it in the workspace where you want to spawn the zombie and name it "SpawnZ" Step 2: Make a script in ServerScriptService and put the robo in there and name it "Robo"(I assume that's a rig) Step 3: Then paste this in the script you made
wait(5) local robo = script.Robo local SZ = game.Workspace.SpawnZ local WaitTime = 4 -- Change to whatever while wait(WaitTime) do local CRobo = robo:Clone() CRobo.Parent = game.Workspace CRobo.HumanoidRootPart.Position = SZ.Position end
Hope this helps. Don't hesitate to ask if you need help with anything else
HEY its me the creator in the future, guess what. I JUST HAD TO PUT .VALUE AT THE END IT WAS THAT SIMPLE. FUCK