I have the InCommand plugin to make my life easier but in a power user way but there's something I've never been tought to (I learned scripting through youtube tutorials) and that is... going through loops and doing things to make it ordered by adding an incremental number at the end.
so, I use a temporary script to check if there's any problems and there was but I fixed it and, it still didn't work because I literally don't know how to do that kind of thing, I was never tought that.
Script:
local model = workspace.ServerRoom for i = 1, 16, 1 do for k, v in pairs(model["ServerPack"] .. i:GetChildren()) do for j = 1, 10, 1 do v.Name = "Box" .. j end end end
Error:
Runtime error in InCommand script: ServerPack is not a valid member of Model "Workspace.ServerRoom" (x2) - Studio
Found the issue. So basically this:
model["ServerPack"] .. i:GetChildren()
would be like saying
model.ServerPack..i
which would result in an error but since ServerPack Doesn't exist it created this error:
Runtime error in InCommand script: ServerPack is not a valid member of Model "Workspace.ServerRoom" (x2) - Studio
So if you move the '..i' into the brackets it should work as normal.
model["ServerPack"..i]:GetChildren()