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

Why is this not cloning parts continually? It only clones 1 part.

Asked by
Axenori 124
4 years ago
while true do
    local p = script.Parent:FindFirstChild("Fire"):Clone()
p.Parent = game.Workspace
    wait(0.3)   
if script.Parent.Parent == game.Workspace then
while true do
    wait(0.75)
p.Transparency = 0.45
while true do
p.Orientation = Vector3.new(math.random(1,365),math.random(1,365),math.random(1,365))
p.Position = Vector3.new(p.Position.X,p.Position.Y + 0.3,p.Position.Z)
local s = 1
p.Size = Vector3.new(p.Size.X - 0.1,p.Size.Y - 0.1,p.Size.Z - 0.1)
p.Transparency = p.Transparency + 0.05
wait(0.1)
if p.Transparency > 0.99 then
 p:Destroy()
end
end
end
end
end

(THE SCRIPT IS INSIDE A MODEL IN WHICH THE "Fire" block is placed too)

0
Are your trying to say that the script is not working and it only creates one clone? blocky010101 23 — 4y
0
please. format. your. script 123nabilben123 499 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

The thing with a while true do loop is that if it starts it never ends. Therefore, it never gets to the other parts of the script and the part will never clone again.

Ad

Answer this question