im trying to clone text buttons to a scrolling frame according to how many accessories the player has.
eg: plr has 3 accessories β clone 3 buttons to scrolling frame

local script:
local char = script.Parent
local accessoryEvent = game.ReplicatedStorage.accessoryEvent
for i, accessory in pairs(char:GetChildren()) do
if accessory:IsA("Accessory") then
print(accessory.Name)
end
accessoryEvent:FireServer(accessory)
end
script:
local accessoryEvent = game.ReplicatedStorage.accessoryEvent
local sf = script.Parent
accessoryEvent.OnServerEvent:Connect(function(p, accessory)
for i = 1, #accessory do
local slot = game.ReplicatedStorage.accessorySlot
local slotClone = slot:Clone()
slotClone.Parent = sf
end
end)