-- Get the workspace in Roblox
local workspace = game:GetService("Workspace")
-- Function to loop through all child objects recursively
local function loopThroughChildren(parent)
for _, child in pairs(parent:GetChildren()) do
-- Your code to process each child goes here
-- Check if the current child has more children
if #child:GetChildren() > 0 then
-- Recursively call the function for the child's children
loopThroughChildren(child)
end
end
end
-- Start the loop from the workspace
loopThroughChildren(workspace)