Here’s something I did, well it renames it but not in order.
local totalPlates = #script.Parent:GetChildren()
for i, plates in pairs(script.Parent:GetChildren()) do
plates.Name = math.random(1, totalPlates)
print(plates.Name)
end
Here’s something I did, well it renames it but not in order.
local totalPlates = #script.Parent:GetChildren()
for i, plates in pairs(script.Parent:GetChildren()) do
plates.Name = math.random(1, totalPlates)
print(plates.Name)
end
You are setting the name to a random number, when you can set the name to the index.
local totalPlates = #script.Parent:GetChildren()
for i, plates in pairs(script.Parent:GetChildren()) do
plates.Name = tostring(i)
print(plates.Name)
end
Thank you so much for helping me!!