I’m MCvojtik, i’m making a fractals making plugin, but i have no idea how to figure out following:
There is a Generator and Inicializator, both will be modified before starting, afterwards the generator gets copied to Inicializator all over again.
Example of Inicializator:

Example of Generator: (The transparent part is inicializator)
I can’t figure out how to make it, so after starting the programme, the size doesn’t change at all along with position (which kinda works, but it places the part in the same place instead of closer)
My code for this:
local function Smaller(Main)
local e
local SmallestSize
--local Main
local Model = Instance.new("Model")
for i,v in pairs(Generatorfolder:GetChildren()) do
local c = v:Clone()
c.Parent = Model
end
Model.PrimaryPart = Model["MidPart"]
local ed = Instance.new("Model")
for i, part in pairs(Initializerfolder:GetChildren()) do
if IsCompiling then
if part.Name ~= "MidPart" then
Model:SetPrimaryPartCFrame(part.CFrame)
for y,x in pairs(Model:GetChildren()) do
SmallestSize = x.Size
e = x:Clone()
if Steps ~= StartStep then
SmallestSize = e.Size
print("Yes")
e.Size = (SmallestSize*SmallestSize)/part.Size
end
local cfram = Main.CFrame:ToObjectSpace(e.CFrame)
e.CFrame = part.CFrame + Vector3.new(cfram.X,0,0)
e.Parent = ed
end
end
SmallestSize = SmallestSize
print(SmallestSize)
part.Transparency = 1
part.Name = "MidPart"
--part:Destroy()
else
break
end
wait()
end
Steps -= 1
if ed:FindFirstChild("MidPart") then
ed["MidPart"]:Destroy()
end
for y,x in pairs(ed:GetChildren()) do
x.Parent = Initializerfolder
x.Name = "FracPart"
end
Model:Destroy()
end
Legend
IsCompiling = If the fractal is being made (sets True when pressing button to start).
Steps = How much the entire function is repeated till end.
StartSteps = Starting number of Steps.
GeneratorFolder = Folder with all generator parts.
InitializatorFolder = Folder with Inicializator parts.
Main = Center point of Generator.
Any help would be appreciated, MCvojtik.

