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

I script for the part to only clone once, but instead 2 cloned parts come out?

Asked by 4 years ago

So I am making a script that clones a part,and then destroys that cloned part, and ads a new cloned part.What is weird, is that when it clones the second cloned part, it clones 2 of them,instead of 1.

0
show script pls raid6n 2196 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

I believe what you want to do is this, but since you have not supplied any code I can't really help you that well. Here's what I've got.

for i = 1,2 do
    local Part = Instance.new("Part")
    coroutine.wrap(function()
        wait(3)
        Part:Destroy()
    end)()
end
Ad

Answer this question