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

How do i fix my wait() so it doesn't loop while waiting?

Asked by 7 years ago
while true do 
local bob =script.Parent:Clone()
bob.Parent = workspace


wait(1)
    end

When i ran the emulation, it just spawned 4 clones, waited and repeated. can someone fix it

0
your code is fine, you probably have duplicate scripts or something Perci1 4988 — 7y
0
How many scripts with that code do you have wherever you have it located? Qweeble 5 — 7y
0
If you want it to stop stopping every one second, add wait() without the one, just leave it blank. DevPotatoe 0 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Try a different type of loop.

for loop = 1, 4 do --Change the 4 to however many times it loops
local bob =script.Parent:Clone()
bob.Parent = workspace
wait(1)
end

If this isn't what you were looking for, I'm sorry. I wasn't quite sure what you wanted to do.

0
i wanted it to NOT loop, my script made it loop 4 times Bombsboom 0 — 7y
0
Oh.. Well "While true" makes it loop animelover6446 41 — 7y
Ad

Answer this question