Ok, so I have been working on a script that changes a ton of names of things inside of models, but it seems to have stopped working.
I get a strange error on this script, which goes through and renames things inside of a model, but I get an error: “attempt to concatenate nil with string”
This is the script. (This is copy + pasted into the command bar when used.)
local bigGroup = game.Workspace.Tycoons.T_RedTeam.TRT_Grid.TRTG_Line01ToLine10.TRTG_Line03 local groups = bigGroup:GetChildren() local renameSplit = string.split(bigGroup.Name, "e") local rename = "TRTGL" local split local group for int, value in pairs(groups) do group = value:GetChildren() for i, v in pairs(group) do split = string.split(string.split(v.Name, "_"), "quare") v.Script.Name = rename .. renameSplit .. split .. split .. "_Script" end end
and this is the line that gives the error:
v.Script.Name = rename .. renameSplit .. split .. split .. "_Script"
Anyone know what’s going on?
EDIT: I looked it up and this is what concatenate means: “Link (things) together in a chain or series.”