local getMinions = game:GetService("Workspace"):GetDescendants()
for _, value in pairs(getMinions) do
if value:IsA('Folder') and value.name == 'minionHolder' then
for _, m in pairs(value:GetChildren()) do
print(m)
end
end
end
gets me
game:GetService("Workspace").minionSpawns.minionSpawn.minionHolder.3
but what i want to return is in the form of
game:GetService("Workspace").minionSpawns.minionSpawn.minionHolder['3']
all the parts in minion holder are named 1 2 3 4 5 etc..
my question is how can i get it to return the path as
game:GetService("Workspace").minionSpawns.minionSpawn.minionHolder['3']
instead of
game:GetService("Workspace").minionSpawns.minionSpawn.minionHolder.3

1 comment
turning the names into numbers, all you would need is to tonumber it. tonumber(m.Name)