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
5 years ago
01while true do
02    local p = script.Parent:FindFirstChild("Fire"):Clone()
03p.Parent = game.Workspace
04    wait(0.3)  
05if script.Parent.Parent == game.Workspace then
06while true do
07    wait(0.75)
08p.Transparency = 0.45
09while true do
10p.Orientation = Vector3.new(math.random(1,365),math.random(1,365),math.random(1,365))
11p.Position = Vector3.new(p.Position.X,p.Position.Y + 0.3,p.Position.Z)
12local s = 1
13p.Size = Vector3.new(p.Size.X - 0.1,p.Size.Y - 0.1,p.Size.Z - 0.1)
14p.Transparency = p.Transparency + 0.05
15wait(0.1)
View all 22 lines...

(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 — 5y
0
please. format. your. script 123nabilben123 499 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 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