while wait() do
local soundRegions = {}
local desc = game.Workspace:GetDescendants()
for i, v in pairs(desc) do
if v.Name == "magicForestHitbox" then
table.insert(soundRegions, 1, v)
end
end
end
I’m going to assume that looping through the entire workspace every 0.03 seconds is not very efficient. Is there a better way to do this?
For more context, I’m attempting to grab the hitbox of a model. Because of randomly generated terrain, I’m not sure when there will be new ones or where they will be. Because of this, I’m manually looking for them.