Problem with cloning frames

I’m working on an obby game that shows the stages in a frame, I have a model in the workspace called “Bases” that are the Spawns, I use the “Clone” to create the frames for each spawn but this is just cloning 9 frames being I have 12 spawn in the model, I really need it but I don’t know what’s wrong!

This is my current Script:

local Bases =  workspace:WaitForChild("Bases")
 for i,v in pairs(Bases:GetChildren()) do
 x = i
end

for p = 1,x do
	local Clone = script.Sample:Clone()
	Clone.Name = "Stage"..p
	Clone.Stage.Text = "Stage"..p
	Clone.ButtonFrame.Button.Number.Value = p
	Clone.Parent  = script.Parent.Frame.Frame.ScrollingFrame
	ScrollingFrame.CanvasSize = 
    UDim2.new(0,0,0,ScrollingFrame.UIListLayout.AbsoluteContentSize.Y)	
end

Photo of the “Bases” model:

Screenshot_28

Video of how the clones frame looks:

you just need to do this:

for p = 1, #Bases:GetChildren() do -- I changed this part
	local Clone = script.Sample:Clone()
	Clone.Name = "Stage"..p
	Clone.Stage.Text = "Stage"..p
	Clone.ButtonFrame.Button.Number.Value = p
	Clone.Parent  = script.Parent.Frame.Frame.ScrollingFrame
	ScrollingFrame.CanvasSize = 
    UDim2.new(0,0,0,ScrollingFrame.UIListLayout.AbsoluteContentSize.Y)	
end

you don’t need that first part

I just realized that it is cloning correctly, but I don’t know how everything is visible in the scrolling frame