Ad
Log in to vote
0

How do you put a number value in a wait()?

Asked by 20 days ago

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

0
Omg lord forbid. I had 2 strokes and almost 1 heart attack reading this. It's easy HeroFigo 42 — 20d
0
ah yes the regen free model script greatneil80 2612 — 20d

2 answers

Log in to vote
0
Answered by 20 days ago

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

0
thanks wswswff 2 — 20d
0
cant i just do script:destroy() ? wswswff 2 — 20d
0
hey umm im not sure why btw person who said this is easy, this script only works on parts that is why im not sure why wswswff 2 — 20d
Ad
Log in to vote
0
Answered by 20 days ago

HEY its me the creator in the future, guess what. I JUST HAD TO PUT .VALUE AT THE END IT WAS THAT SIMPLE. FUCK

0
sorry for f word its just that it took 1 hour to resolve wswswff 2 — 20d
0
Get used to that kiddo. No matter how good you are it's always 1 stoopid thing that takes 1 hour to fix. At least. Could you be so kind to accept my answear? HeroFigo 42 — 20d
0
no lol its wrong wswswff 2 — 19d
0
sorry but it is wrong, if you told me to put .value I would have accepted it but its not what I was looking for, thanks for trying though wswswff 2 — 19d

Answer this question