I'm making a script that moves parts in a model in serverstorage to a model in workspace, here's my code;
local active = script.Parent.active
local donutfolder = game.ServerStorage.donuts
local donutcode = script.Parent.donutcode
local donuts = script.Parent.donuts
while true do --> Looks a bit messy but it gets the job done.
if active.Value then
else
donuts:ClearAllChildren()
end
if donutcode.Value == 1 then
donut.Parent = donuts --> So I tried a for i, donut in pairs(donutfoler.D1:GetChildren()) do but that didn't work, but can I modify it so it works?
donut.Anchored = false
end
wait(5)
end
So if I add a for i, donut in pairs(donutfoler.D1:GetChildren()) do but it broke the script, how do I fix this? And no, I wasn't getting any errors whatsoever.

2 comments
just parent it into workspace?? why do u need to individually parent the children, just parent the model/whatever
Thats not whats looking to be achieved.