Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

3 comments

0

your code is fine, you probably have duplicate scripts or something

0

How many scripts with that code do you have wherever you have it located?

0

If you want it to stop stopping every one second, add wait() without the one, just leave it blank.

1 answer

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.

2 comments

0

i wanted it to NOT loop, my script made it loop 4 times

0

Oh.. Well "While true" makes it loop

This discussion is preserved as it was. New answers, comments, and votes are closed.